Method for determining path computation element and communications device

ABSTRACT

Embodiments of the present disclosure relate to a method for determining a path computation element and a communications device, where location information and transmission capability information of a PCE are carried in a route advertisement message and are advertised to a PCC, so that the PCC can select, according to the transmission capability information of the PCE in the route advertisement message, a PCE that meets a transmission capability of the PCC, to perform path computation; therefore, a problem that a transmission capability mismatch between the PCC and the PCE causes a failure in establishing a PCEP session is avoided.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2014/088445, filed on Oct. 13, 2014, which claims priority toChinese Patent Application No. 201310496882.0, filed on Oct. 21, 2013,both of which are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

The present disclosure relates to the communications field, and inparticular, to a method for determining a path computation element (PCE)and a communications device.

BACKGROUND

A PCE is a functional entity that is specially responsible for pathcomputation in a network, and may be an independent network device, ormay be an apparatus or an application program in a network device. Basedon a known network topology and a constraint condition, the PCE obtains,by means of computation according to a request from a path computationclient (PCC), a path that meets the constraint condition.

Generally, communication is performed between a PCC and a PCE andbetween a PCE and a PCE by using PCE communication protocol (PCEP), apath computation request is submitted, and a path computation result isobtained. A PCC first obtains information such as location, a pathcomputation scope, a neighbor PCE, and path computation capability of aPCE by using a PCE discovery mechanism, to select a PCE that meets arequirement, to submit a path computation request. According to thestandard, generally, a Transmission Control Protocol (TCP) connection isfirst established between a PCC and a PCE, and then a PCEP session isestablished based on the TCP connection, that is, PCEP over TCP. Ifprotection needs to be provided for the TCP connection, a TCPmessage-digest algorithm 5 (MD5 option may be used. However, with thedevelopment of a network technology, the TCP MD5 is replaced by a TCPauthentication option (AO), and the Transport Layer Security (TLS)Encryption Protocol that provides secrecy and data integrity alsoemerges.

If there are various transmission protocols, how to effectivelyestablish a PCEP session becomes an urgent problem to be resolved.

SUMMARY

The present disclosure provides a method for determining a PCE and acommunications device, which are used to resolve a problem of how toeffectively establish a PCEP session.

According to a first aspect, an embodiment of the present disclosureprovides a method for determining a path computation element, including:

receiving, by a path computation client PCC, at least one routeadvertisement message, where the route advertisement message includeslocation information and transmission capability information of a pathcomputation element PCE, where

the transmission capability information of the PCE includes a first flagbit, a second flag bit, and a third flag bit, where the first flag bitis used to indicate whether the PCE supports a Transmission ControlProtocol TCP message-digest algorithm 5 MD5 option, the second flag bitis used to indicate whether the PCE supports a TCP authentication optionAO, and the third flag bit is used to indicate whether the PCE supportsTransport Layer Security TLS; and

determining, according to a preset selection policy and the transmissioncapability information of the PCE in the at least one routeadvertisement message, a PCE used for path computation.

According to a second aspect, an embodiment of the present disclosureprovides a communications device, including:

a receiving unit, configured to receive at least one route advertisementmessage, where the route advertisement message includes locationinformation and transmission capability information of a pathcomputation element PCE, and the transmission capability information ofthe PCE includes a first flag bit, a second flag bit, and a third flagbit, where the first flag bit is used to indicate whether the PCEsupports a Transmission Control Protocol TCP message-digest algorithm 5MD5 option, the second flag bit is used to indicate whether the PCEsupports a TCP authentication option AO, and the third flag bit is usedto indicate whether the PCE supports Transport Layer Security TLS; and

a determining unit, configured to determine, according to a presetselection policy and the transmission capability information of the PCEin the at least one route advertisement message, a PCE used for pathcomputation.

According to a third aspect, an embodiment of the present disclosureprovides a communications device, including:

a receiving unit, configured to receive at least one Interior GatewayProtocol IGP route advertisement message from an autonomous system ASdomain, where the IGP route advertisement message includes locationinformation and transmission capability information of a pathcomputation element PCE, and the transmission capability information ofthe PCE includes a first flag bit, a second flag bit, and a third flagbit, where the first flag bit is used to indicate whether the PCEsupports a Transmission Control Protocol TCP message-digest algorithm 5MD5 option, the second flag bit is used to indicate whether the PCEsupports a TCP authentication option AO, and the third flag bit is usedto indicate whether the PCE supports Transport Layer Security TLS;

a generating unit, configured to generate a Border Gateway Protocol(BGP) route advertisement message according to the at least one IGProute advertisement message, where the BGP route advertisement messageincludes the location information and the transmission capabilityinformation of the PCE in the at least one IGP route advertisementmessage; and

a sending unit, configured to send the BGP route advertisement messageto an AS domain other than the AS domain.

According to a fourth aspect, an embodiment of the present disclosureprovides a communications device, including:

a generating unit, configured to generate an Interior Gateway ProtocolIGP route advertisement message, where the IGP route advertisementmessage includes location information and transmission capabilityinformation of a path computation element PCE, and the transmissioncapability information of the PCE includes a first flag bit, a secondflag bit, and a third flag bit, where the first flag bit is used toindicate whether the PCE supports a Transmission Control Protocol TCPmessage-digest algorithm 5 MD5 option, the second flag bit is used toindicate whether the PCE supports a TCP authentication option AO, andthe third flag bit is used to indicate whether the PCE supportsTransport Layer Security TLS; and

a sending unit, configured to send the IGP route advertisement messageto an area in which the communications device is located.

According to the method for determining a path computation element andthe communications device provided in the embodiments of the presentdisclosure, a PCC receives a route advertisement message that carrieslocation information and transmission capability information of a PCE,and selects, according to the transmission capability information of thePCE and a preset selection policy, a PCE that meets a transmissioncapability supported by the PCC, to perform path computation, which canestablish a PCEP session more effectively, and further improveefficiency and a success rate of submitting a path computation requestand obtaining a path computation result by the PCC.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a flowchart of a method for advertising a transmissioncapability according to an embodiment of the present disclosure;

FIG. 2a is a schematic diagram of a format of an OSPF PCED TLV or anIS-IS PCED sub-TLV according to an embodiment of the present disclosure;

FIG. 2b is a schematic diagram of a format of a sub-TLV that carriesport information according to an embodiment of the present disclosure;

FIG. 3 is a flowchart of another method for advertising a transmissioncapability according to an embodiment of the present disclosure;

FIG. 4 is a flowchart of a method for determining a path computationelement according to an embodiment of the present disclosure;

FIG. 5 is a flowchart of a method for advertising a transmissioncapability and determining a path computation element according to anembodiment of the present disclosure;

FIG. 6 is a flowchart of another method for advertising a transmissioncapability and determining a path computation element according to anembodiment of the present disclosure;

FIG. 7 is a flowchart of still another method for advertising atransmission capability and determining a path computation elementaccording to an embodiment of the present disclosure;

FIG. 8 is a structural block diagram of a communications deviceaccording to an embodiment of the present disclosure;

FIG. 9 is a structural block diagram of another communications deviceaccording to an embodiment of the present disclosure;

FIG. 10 is a structural block diagram of still another communicationsdevice according to an embodiment of the present disclosure;

FIG. 11 is a schematic structural diagram of a communications deviceaccording to an embodiment of the present disclosure;

FIG. 12 is a schematic structural diagram of another communicationsdevice according to an embodiment of the present disclosure; and

FIG. 13 is a schematic structural diagram of still anothercommunications device according to an embodiment of the presentdisclosure.

DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of theembodiments of the present disclosure clearer, the following describesthe technical solutions in the embodiments of the present disclosurewith reference to the accompanying drawings in the embodiments of thepresent disclosure.

To a provide thorough understanding, the following further describes thespecific embodiments of the present disclosure in detail with referenceto the accompanying drawings. The embodiments are not intended to limitthe protection scope of the present disclosure.

Because there are various transmission protocols, if transmissionprotocol information is not configured or negotiated in advance betweena PCC and a PCE, establishment of a PCEP session between the PCC and thePCE may fail, and the PCC cannot submit a path computation request tothe PCE and cannot obtain a path computation result. The PCC needs towait a new route advertisement message, such as an OSPF link stateadvertisement (LSA), to determine a PCE that meets the path computationrequest from the PCC and supports TLS, so that the PCEP session can besuccessfully established, and further, the path computation request canbe submitted and the path computation result can be obtained. In thisway, before the PCC can successfully establish the PCEP session toobtain the path computation result, the PCC may fail for many times,thereby reducing efficiency of path computation in a network. In view ofthis, the present disclosure provides technical solutions in which aroute advertisement message that carries a transmission capability of aPCE is sent to a PCC, so that the PCC determines, according to thetransmission capability of the PCE in the route advertisement message, aPCE used for path computation.

The following describes the technical solutions of the presentdisclosure in detail.

As shown in FIG. 1, an embodiment of the present disclosure provides amethod for advertising a transmission capability, where the methodincludes the following steps:

101. A communications device generates an IGP route advertisementmessage, where the IGP route advertisement message includes locationinformation and transmission capability information of a first pathcomputation element PCE.

The transmission capability information of the first PCE includes afirst flag bit, a second flag bit, and a third flag bit, where the firstflag bit is used to indicate whether the first PCE supports aTransmission Control Protocol TCP message-digest algorithm 5 MD5 option(PCEP over TCP MD5), the second flag bit is used to indicate whether thefirst PCE supports a TCP authentication option AO (PCEP over TCP AO),and the third flag bit is used to indicate whether the first PCEsupports Transport Layer Security TLS (PCEP over TLS).

It may be understood that if the second flag bit indicates that thefirst PCE supports the TCP AO and the third flag bit indicates that thefirst PCE supports the TLS, the second flag bit and the third flag bittogether indicate that the first PCE supports the TLS and the TCP AO(PCEP over TLS and TCP AO). Certainly, optionally, the transmissioncapability information of the first PCE further includes a fourth flagbit, where the fourth flag bit is used to indicate whether the first PCEsupports the TLS and the TCP AO.

Further, the route advertisement message may further include portinformation of the first PCE, where the port information includes a porttype and a port number. The port type includes a PCEP over TCP (PCEPover TCP) port, and a PCEP over TLS (PCEP over TLS) port; or the porttype includes a PCEP over TCP MD5 option (PCEP over TCP MD5) port, aPCEP over TCP AO (PCEP over TCP AO) port, and a PCEP over TLS (PCEP overTLS) port. Further, optionally, if the transmission capabilityinformation of the first PCE further includes the fourth flag bit,accordingly, the port type includes a PCEP over TLS and TCP AO (PCEPover TLS and TCP AO) port.

102. Send the IGP route advertisement message to an area in which thecommunications device is located.

The communications device sends the IGP route advertisement message tothe area in which the communications device is located, which generallymay also mean that the IGP route advertisement message is flooded, so asto advertise a transmission capability of the first PCE to a memberwithin the area in which the communications device is located.

In this embodiment, the communications device is an IGP router, and thearea in which the communications device is located is an IGP area. IGPincludes OSPF and IS-IS. Accordingly, the communications device is anOSPF router, the area in which the communications device is located isan OSPF area, and the IGP route advertisement message is an OSPF LSA; orthe communications device is an IS-IS router, the area in which thecommunications device is located is an IS-IS area, and the IGP routeadvertisement message is an IS-IS LSA.

When a PCC and a PCE support a same Interior Gateway Protocol (IGP) in arouting domain, such as the Open Shortest Path First (OSPF) protocol orthe Intermediate System to Intermediate System (IS-IS) protocol, dynamicdiscovery of the PCE can be implemented by using the OSPF Protocol orthe IS-IS Protocol.

In a case of the OSPF protocol, by using a flooding mechanism of theOSPF protocol, a PCE Discovery (PCED) type-length-value (TLV) is used toflood PCE information to a member within an entire OSPF area by using anOSPF control message, such as a link state advertisement LSA, so as toadvertise the information related to the PCE, where the informationincludes a location, a path computation scope, a neighbor PCE, acommunication capability, a path computation capability, and the like ofthe PCE; and

in a case of the IS-IS protocol, a PCED sub-TLV is used to flood PCEinformation to a member within an entire IS-IS area by using an IS-IScontrol message, such as an LSA, so as to advertise the informationrelated to the PCE, where the information includes a location, a pathcomputation scope, a neighbor PCE, a communication capability, a pathcomputation capability, and the like of the PCE.

The path computation scope of the PCE may include an IS-IS intra-area,an IS-IS inter-area, an inter-AS (AS), an inter-layer, and the like.

The location information of the first PCE, such as an Internet Protocolversion 4 (IPv4) address or an Internet Protocol version 6 (IPv6)address, may be carried in a PCE-ADDRESS sub-TLV of the PCED TLV in theOSPF protocol or of the PCED sub-TLV in the IS-IS protocol. In thisembodiment of the present disclosure, by extending the PCED TLV in theOSPF protocol or the PCED sub-TLV in the IS-IS protocol, thetransmission capability information of the PCE may be used to definethree currently unused flag bits in a PCE-CAP-FLAGS sub-TLV as theforegoing first flag bit, second flag bit, and third flag bit, which arerespectively used to indicate whether the first PCE supports the TCP MD5option, whether the first PCE supports the TCP AO, and whether the firstPCE supports the TLS. Further, the fourth flag bit may be furtherdefined and is used to indicate whether the first PCE supports the TLSand the TCP AO.

A format of the PCED TLV in the OSPF protocol or the PCED sub-TLV in theIS-IS protocol may be shown in FIG. 2a . A correspondence between fourextended flag bits in the PCE-ADDRESS sub-TLV in FIG. 2a and PCEcapability descriptions may be as follows:

Flag Bit (bits) Capability Description (capability description) 12Indicating whether to support a TCP MD5 (PCEP over TCP MD5) 13Indicating whether to support a TCP AO (PCEP over TCP AO) 14 Indicatingwhether to support TLS (PCEP over TLS) 15 Indicating whether to supportTLS and a TCP AO (PCEP over TLS and TCP AO)

It should be noted that in FIG. 2a , defining of the four flag bits,namely, 12, 13, 14, and 15 is used as an example, and the foregoing flagbits and the corresponding capability descriptions are also used merelyas an example, and constitute no limitation to the present disclosure.

In this embodiment of the present disclosure, by extending PCEcapability discovery in the OSPF or IS-IS protocol, advertisement of thetransmission capability of the PCE can be implemented, so that the PCCcan select a PCE that matches a transmission capability of the PCC, toimprove efficiency and a success rate of submitting a path computationrequest and obtaining a path computation result by the PCC.

Further, the PCED TLV in the OSPF protocol or the PCED sub-TLV in theIS-IS protocol may be further extended, a sub-TLV that carries the portinformation of the first PCE is defined, and a format may be shown inFIG. 2b . The port information of the first PCE may be carried in twoimplementation manners:

In one manner, two sub-TLVs are defined to carry the port information ofthe PCE, where one sub-TLV carries a PCEP over TCP port, and the othersub-TLV carries a PCEP over TLS port. A PCE that supports the TCP MD5option and a PCE that supports the TCP AO share the sub-TLV that carriesthe PCEP over TCP port, and a PCE that supports the TLS uses the sub-TLVof the PCEP over TLS port. Optionally, if the transmission capabilityinformation of the first PCE further includes the fourth flag bit, a PCEthat supports the TLS and a PCE that supports the TLS and the TCP AOshare the sub-TLV of the PCEP over TLS port.

In the other manner, three sub-TLVs are defined to respectively carry aPCEP over TCP MD5 option port, a PCEP over TCP AO port, and a PCEP overTLS port. Further, if the transmission capability information of thefirst PCE further includes the fourth flag bit, a sub-TLV may be furtherdefined to carry a PCEP over TLS and TCP AO port.

For example, four flag bits in the PCE-ADDRESS sub-TLV are extended andused to support the transmission capability of the PCE, and if the foursub-TLVs are defined to respectively carry corresponding ports of theforegoing four transmission capabilities,

if the first flag bit in the PCE-CAP-FLAGS sub-TLV indicates that thePCE supports the TCP MD5 option, a sub-TLV of the PCEP over TCP MD5 portis carried in the PCED TLV in the OSPF protocol or in the PCED sub-TLVin the IS-IS protocol;

if the second flag bit in the PCE-CAP-FLAGS sub-TLV indicates that thePCE supports the TCP AO, a sub-TLV of the PCEP over TCP AO port iscarried in the PCED TLV in the OSPF protocol or in the PCED sub-TLV inthe IS-IS protocol;

if the third flag bit in the PCE-CAP-FLAGS sub-TLV indicates that thePCE supports the TLS, a sub-TLV of the PCEP over TLS port is carried inthe PCED TLV in the OSPF protocol or in the PCED sub-TLV in the IS-ISprotocol; and

if the fourth flag bit in the PCE-CAP-FLAGS sub-TLV indicates that thePCE supports the TLS and the TCP AO, a sub-TLV of the PCEP over TLS andTCP AO port is carried in the PCED TLV in the OSPF protocol or in thePCED sub-TLV in the IS-IS protocol.

If two sub-TLVs are defined to respectively carry corresponding portsthat support a TCP and TLS transmission capability,

in the PCE-CAP-FLAGS sub-TLV, if the first flag bit indicates that thePCE supports the TCP MD5 option, or the second flag bit indicates thatthe PCE supports the TCP AO, or the first flag bit indicates that thePCE supports the TCP MD5 option and the second flag bit indicates thatthe PCE supports the TCP AO, a sub-TLV of the PCEP over TCP port iscarried in the PCED TLV in the OSPF protocol or in the PCED sub-TLV inthe IS-IS protocol; and

in the PCE-CAP-FLAGS sub-TLV, if the third flag bit indicates that thePCE supports the TLS, or the fourth flag bit indicates that the PCEsupports the TLS and the TCP AO, or the third flag bit indicates thatthe PCE supports the TLS and the fourth flag bit indicates that the PCEsupports the TLS and the TCP AO, a sub-TLV of the PCEP over TLS port iscarried in the PCED TLV in the OSPF protocol or in the PCED sub-TLV inthe IS-IS protocol.

Further, before the route advertisement message is generated, the methodmay further include: receiving, by the communications device,registration information of the first PCE, where the registrationinformation includes the transmission capability of the first PCE. Theregistration information further includes a path computation scope, aneighbor PCE, a communication capability, a path computation capability,and the like of the first PCE.

Further, the route advertisement message may further include locationinformation and transmission capability information of a second PCE, andoptionally, further includes port information of the second PCE.Accordingly, before the route advertisement message is generated, themethod may further include: receiving, by the communications device,registration information of the second PCE, where the registrationinformation includes a transmission capability information of the secondPCE.

According to the method for advertising a transmission capabilityprovided in this embodiment of the present disclosure, a PCED TLV in theOSPF protocol or a PCED sub-TLV in the IS-IS protocol is extended, and aflag bit is defined to indicate a transmission capability of a PCE, sothat advertisement of the transmission capability of the PCE can beimplemented based on the OSPF protocol or the IS-IS protocol, and a PCCcan select a PCE that matches a transmission capability of the PCC,which ensures that a PCEP session is effectively established between thePCC and the PCE, and improves efficiency and a success rate of pathcomputation between the PCC and the PCE; further, a new sub-TLV isdefined to carry port information corresponding to the transmissioncapability, and in this way, when the PCC does not know a port that isof the PCE and is used for establishing the PCEP session, the PCC maydirectly acquire port information from an OSPF LSA or an IS-IS LSA,which further ensures that the PCEP session is effectively establishedbetween the PCC and the PCE.

Further, based on the foregoing method shown in FIG. 1, as shown in FIG.3, an embodiment of the present disclosure provides another method foradvertising a transmission capability, where the method includes thefollowing steps:

301. A Border Gateway Protocol (BGP) router receives at least one IGProute advertisement message from an autonomous system AS domain, wherethe IGP route advertisement message includes location information andtransmission capability information of a path computation element PCE.

The transmission capability information of the PCE includes a first flagbit, a second flag bit, and a third flag bit, where the first flag bitis used to indicate whether the PCE supports a Transmission ControlProtocol TCP message-digest algorithm 5 option, the second flag bit isused to indicate whether the PCE supports a TCP authentication optionAO, and the third flag bit is used to indicate whether the PCE supportsTransport Layer Security TLS. Optionally, the transmission capabilityinformation of the PCE further includes a fourth flag bit, where thefourth flag bit is used to indicate whether the PCE supports the TLS andthe TCP AO.

The IGP route advertisement message is an OSPF LSA or an IS-IS LSA.

The BGP router may be a BGP speaker.

In specific implementation, three currently unused flag bits in aPCE-CAP-FLAGS sub-TLV of a PCED TLV in the OSPF protocol or of a PCEDsub-TLV in the IS-IS protocol may be defined as the foregoing first flagbit, second flag bit, and third flag bit, which are respectively used toindicate whether the PCE supports the TCP MD5 option, whether the PCEsupports the TCP AO, and whether the PCE supports the TLS. Further, thefourth flag bit may be further defined and is used to indicate whetherthe PCE supports the TLS and the TCP AO. Specifically, reference may bemade to the method shown in FIG. 1 in the present disclosure, anddetails are not described herein again. In this way, based on PCEcapability discovery in the extended OSPF or IS-IS protocol,advertisement of a transmission capability of the PCE can beimplemented.

302. Generate a Border Gateway Protocol (BGP) route advertisementmessage according to the at least one IGP route advertisement message,where the BGP route advertisement message includes the locationinformation and the transmission capability information of the PCE inthe at least one IGP route advertisement message.

For example, it is assumed that the BGP router receives two IGP routeadvertisement messages: a first IGP route advertisement message and asecond IGP route advertisement message, where the first IGP routeadvertisement message includes location information and transmissioncapability information of a first PCE, the second route advertisementmessage includes location information and transmission capabilityinformation of a second PCE, and the first IGP route advertisementmessage and the second IGP route advertisement message come from an ASdomain. The BGP router generates the BGP route advertisement messageaccording to the first route advertisement message and the second routeadvertisement message, where the BGP route advertisement messageincludes the location information and the transmission capabilityinformation of the first PCE and the location information and thetransmission capability information of the second PCE.

In this embodiment of the present disclosure, the BGP router maygenerate a BGP route advertisement message according to only one IGProute advertisement message, or may generate a BGP route advertisementmessage according to multiple IGP route advertisement messages receivedfrom an AS domain, and send, to another AS domain by using the BGP routeadvertisement message, location information and transmission capabilityinformation of all PCEs carried in the multiple IGP route advertisementmessages.

Optionally, after the BGP router receives an IGP route advertisementmessage, the method further includes: checking whether the IGP routeadvertisement message includes the transmission capability informationof the PCE; and if the transmission capability information of the PCE isincluded, generating a BGP route advertisement message that includes thelocation information and the transmission capability information of thePCE; or if the transmission capability information of the PCE is notincluded, performing processing according to a current standardspecification.

In specific implementation, the BGP protocol may be extended, and aPCE-ADDRESS sub-TLV and a PCE-CAP-FLAGS sub-TLV are defined in a networklayer reachability information (NLRI) TLV in the BGP protocol and arecarried in the BGP route advertisement message. Formats of thePCE-ADDRESS sub-TLV and the PCE-CAP-FLAGS sub-TLV may be the same as theforegoing extended PCED TLV in the OSPF Protocol or the foregoingextended PCED sub-TLV in the IS-IS protocol, as shown in FIG. 2a .Optionally, by extending a capability optional parameter in the BGPprotocol, the transmission capability information of the PCE may also beused to define a currently unused capability code, where the code isused to identify the transmission capability of the PCE. Threecapability codes are defined to be respectively used to identify whetherthe TCP MD5 option is supported, whether the TCP AO is supported, andwhether the TLS is supported; further, a capability code may be furtherdefined to be used to identify whether the TLS and the TCP AO aresupported.

Further, the IGP route advertisement message may further include portinformation of the PCE, where the port information includes a port typeand a port number. The port type includes a PCEP over TCP port, and aPCEP over TLS port; or the port type includes: a PCEP over TCP MD5option port, a PCEP over TCP AO port, and a PCEP over TLS port, andfurther, may further include a PCEP over TLS and TCP AO port. Inspecific implementation, the PCED TLV in the OSPF protocol or the PCEDsub-TLV in the IS-IS protocol may be extended, a sub-TLV that carriesport information of the PCE is defined, and a format may be shown inFIG. 2b . Specifically, reference may be made to the method shown inFIG. 1 in the present disclosure, and details are not described hereinagain.

Accordingly, the BGP route advertisement message may further include theport information of the PCE. In specific implementation, the BGPprotocol may be extended. For example, the sub-TLV that carries the portinformation of the PCE is defined in NLRI, and a format may be shown inFIG. 2b . Being similar to extension of the OSPF protocol or the IS-ISprotocol, the port information of the PCE may also be carried in twoimplementation manners:

In one manner, two sub-TLVs are defined to carry the port information ofthe PCE, where one sub-TLV carries a PCEP over TCP port, and the othersub-TLV carries a PCEP over TLS port. A PCE that supports the TCP MD5option and a PCE that supports the TCP AO share the sub-TLV that carriesthe PCEP over TCP port, and a PCE that supports the TLS uses the sub-TLVof the PCEP over TLS port. Optionally, if the transmission capabilityinformation of the PCE further includes the fourth flag bit, a PCE thatsupports the TLS and a PCE that supports the TLS and the TCP AO sharethe sub-TLV of the PCEP over TLS port.

In the other manner, three sub-TLVs are defined to respectively carry aPCEP over TCP MD5 option port, a PCEP over TCP AO port, and a PCEP overTLS port. Further, if the transmission capability information of the PCEfurther includes the fourth flag bit, a sub-TLV may be further definedto carry a PCEP over TLS and TCP AO port.

303. Send the BGP route advertisement message to an AS domain other thanthe AS domain.

Assuming that the at least one IGP route advertisement message comesfrom a first AS and the BGP router is located on a border between thefirst AS and a second AS, the BGP route advertisement message is sent tothe second AS to advertise a transmission capability of the first PCE toa member within the second AS.

It may be understood that as described in the method shown in FIG. 1 inthe present disclosure, the IGP route advertisement message may includelocation information and transmission capability information of only onePCE, or may include location information and transmission capabilityinformation of multiple PCEs. Accordingly, the BGP route advertisementmessage includes the location information and the transmissioncapability information of the multiple PCEs in the IGP routeadvertisement message.

According to the method for advertising a transmission capabilityprovided in this embodiment of the present disclosure, a BGP routerimplements advertisement of a PCE transmission capability between ASs byusing an extended BGP protocol, which can ensure that a PCEP session iseffectively established between a PCC and a PCE in inter-ASs, and canimprove efficiency and a success rate of path computation between thePCC and the PCE.

Further, based on the foregoing methods shown in FIG. 1 and FIG. 3, asshown in FIG. 4, an embodiment of the present disclosure provides amethod for determining a path computation element, where the methodincludes the following steps:

401. A PCC receives at least one route advertisement message, where theroute advertisement message includes location information andtransmission capability information of a path computation element PCE.

The transmission capability information of the PCE includes a first flagbit, a second flag bit, and a third flag bit, where the first flag bitis used to indicate whether the PCE supports a TCP MD5 option, thesecond flag bit is used to indicate whether the PCE supports a TCP AO,and the third flag bit is used to indicate whether the PCE supports TLS.

Optionally, when a flag bit is 0, it indicates not supporting; when aflag bit is 1, it indicates supporting. For example, in the routeadvertisement message, if the first flag bit is 1, it indicates that thePCE supports the TCP MD5 option; if the second flag bit is 0, itindicates that the PCE does not support the TCP AO; and if the thirdflag bit is 1, it indicates that the PCE supports the TLS.

It may be understood that if the second flag bit indicates that the PCEsupports the TCP AO and the third flag bit indicates that the PCEsupports the TLS, the second flag bit and the third flag bit togetherindicate that the PCE supports the TLS and the TCP AO. Certainly,optionally, the transmission capability information of the PCE furtherincludes a fourth flag bit, where the fourth flag bit is used toindicate whether the PCE supports the TLS and the TCP AO.

Optionally, the route advertisement message further includes portinformation of the PCE, where the port information includes a port typeand a port number. The port type includes a path computation protocolPCEP over TCP port, and a PCEP over TLS port; or the port type includesa PCEP over TCP digest algorithm 5 option port, a PCEP over TCP AO port,and a PCEP over TLS port. Further, optionally, if the transmissioncapability information of the PCE further includes the fourth flag bit,accordingly, the port type includes a PCEP over TLS and TCP AO port.

The route advertisement message may be an IGP route advertisementmessage (specifically, reference may be made to the method shown in FIG.1 in the present disclosure) or a BGP route advertisement message(specifically, reference may be made to the method shown in FIG. 3 inthe present disclosure).

The IGP route advertisement message may be an OSPF LSA or an IS-IS LSA.In specific implementation, the location information of the PCE, such asan IPv4 address or an IPv6 address, may be carried in a PCE-ADDRESSsub-TLV of a PCED TLV in the OSPF LSA or of a PCED sub-TLV in the IS-ISLSA. By extending a PCED TLV in the OSPF protocol or a PCED sub-TLV inthe IS-IS protocol, the transmission capability information of the PCEmay be used to respectively define three currently unused flag bits in aPCE-CAP-FLAGS sub-TLV as the foregoing first flag bit, second flag bit,and third flag bit; further, the fourth flag bit may be further defined.A specific format of the PCED TLV in the OSPF protocol or the PCEDsub-TLV in the IS-IS protocol may be shown in FIG. 2a . A correspondencebetween four extended flag bits in the PCE-ADDRESS sub-TLV in FIG. 2aand PCE capability descriptions may be as follows:

Flag Bit (bits) Capability Description (capability description) 12Indicating whether to support a TCP MD5 (PCEP over TCP MD5) 13Indicating whether to support a TCP AO (PCEP over TCP AO) 14 Indicatingwhether to support TLS (PCEP over TLS) 15 Indicating whether to supportTLS and a TCP AO (PCEP over TLS and TCP AO)

It should be noted that in FIG. 2a , defining of the four flag bits,namely, 12, 13, 14, and 15 is used as an example, and the foregoingcapability descriptions corresponding to all flag bits are also usedmerely as an example, and constitute no limitation to the presentdisclosure.

In this embodiment of the present disclosure, by extending PCEcapability discovery in the OSPF or IS-IS protocol, advertisement of atransmission capability of the PCE is implemented. The PCC receives theroute advertisement message that carries the transmission capabilityinformation of the PCE and selects a PCE that matches a transmissioncapability of the PCC, which can ensure that a PCEP session iseffectively established between the PCC and the PCE, and further improveefficiency and a success rate of submitting a path computation requestand obtaining a path computation result by the PCC.

Further, the PCED TLV in the OSPF protocol or the PCED sub-TLV in theIS-IS protocol may be further extended, a sub-TLV that carries the portinformation of the PCE is defined, and a format may be shown in FIG. 2b. The port information of the PCE may be carried in two implementationmanners:

In one manner, two sub-TLVs are defined to carry the port information ofthe PCE, where one sub-TLV carries a PCEP over TCP port, and the othersub-TLV carries a PCEP over TLS port. A PCE that supports the TCP MD5option and a PCE that supports the TCP AO share the sub-TLV that carriesthe PCEP over TCP port, and a PCE that supports the TLS uses the sub-TLVof the PCEP over TLS port. Optionally, if the transmission capabilityinformation of the PCE further includes the fourth flag bit, a PCE thatsupports the TLS and a PCE that supports the TLS and the TCP AO sharethe sub-TLV of the PCEP over TLS port.

In the other manner, three sub-TLVs are defined to respectively carry aPCEP over TCP MD5 option port, a PCEP over TCP AO port, and a PCEP overTLS port. Further, if the transmission capability information of the PCEfurther includes the fourth flag bit, a sub-TLV may be further definedto carry a PCEP over TLS and TCP AO port.

For example, four flag bits in the PCE-ADDRESS sub-TLV are extended andused to support the transmission capability of the PCE, and if the foursub-TLVs are defined to respectively carry corresponding ports of theforegoing four transmission capabilities,

if the first flag bit in the PCE-CAP-FLAGS sub-TLV indicates that thePCE supports the TCP MD5 option, a sub-TLV of the PCEP over TCP MD5 portis carried in the PCED TLV in the OSPF protocol or in the PCED sub-TLVin the IS-IS protocol;

if the second flag bit in the PCE-CAP-FLAGS sub-TLV indicates that thePCE supports the TCP AO, a sub-TLV of the PCEP over TCP AO port iscarried in the PCED TLV in the OSPF protocol or in the PCED sub-TLV inthe IS-IS protocol;

if the third flag bit in the PCE-CAP-FLAGS sub-TLV indicates that thePCE supports the TLS, a sub-TLV of the PCEP over TLS port is carried inthe PCED TLV in the OSPF protocol or in the PCED sub-TLV in the IS-ISprotocol; and

if the fourth flag bit in the PCE-CAP-FLAGS sub-TLV indicates that thePCE supports the TLS and the TCP AO, a sub-TLV of the PCEP over TLS andTCP AO port is carried in the PCED TLV in the OSPF protocol or in thePCED sub-TLV in the IS-IS protocol.

If two sub-TLVs are defined to respectively carry corresponding portsthat support a TCP and TLS transmission capability,

in the PCE-CAP-FLAGS sub-TLV, if the first flag bit indicates that thePCE supports the TCP MD5 option, or the second flag bit indicates thatthe PCE supports the TCP AO, or the first flag bit indicates that thePCE supports the TCP MD5 option and the second flag bit indicates thatthe PCE supports the TCP AO, a sub-TLV of the PCEP over TCP port iscarried in the PCED TLV in the OSPF protocol or in the PCED sub-TLV inthe IS-IS protocol; and

in the PCE-CAP-FLAGS sub-TLV, if the third flag bit indicates that thePCE supports the TLS, or the fourth flag bit indicates that the PCEsupports the TLS and the TCP AO, or the third flag bit indicates thatthe PCE supports the TLS and the fourth flag bit indicates that the PCEsupports the TLS and the TCP AO, a sub-TLV of the PCEP over TLS port iscarried in the PCED TLV in the OSPF protocol or in the PCED sub-TLV inthe IS-IS protocol.

The BGP route advertisement message includes the location informationand the transmission capability information of the PCE, which can beimplemented by extending the BGP protocol in specific implementation.For example, a PCE-ADDRESS sub-TLV and a PCE-CAP-FLAGS sub-TLV aredefined in an NLRI TLV in the BGP protocol and are carried in the BGProute advertisement message, where the PCE-ADDRESS sub-TLV is used tocarry the location information of the PCE, and the PCE-CAP-FLAGS sub-TLVis used to carry the transmission capability information of the PCE. Aspecific format may be the same as the foregoing extended PCED TLV inthe OSPF protocol or the foregoing extended PCED sub-TLV in the IS-ISprotocol, as shown in FIG. 2 a.

Further, the BGP route advertisement message may further include theport information of the PCE, where the port information includes a porttype and a port number. Corresponding to the IGP route advertisementmessage, the port type includes a PCEP over TCP port, and a PCEP overTLS port; or the port type includes a PCEP over TCP MD5 port, a PCEPover TCP AO port, and a PCEP over TLS port, and further, may furtherinclude a PCEP over TLS and TCP AO port. In specific implementation, theBGP protocol may be extended. For example, the sub-TLV that carries theport information of the PCE is defined in NLRI, and a format may beshown in FIG. 2b . Corresponding to extension of the OSPF protocol orthe IS-IS protocol, the port information of the PCE may also be carriedin two implementation manners:

In one manner, two sub-TLVs are defined to carry the port information ofthe PCE, where one sub-TLV carries a PCEP over TCP port, and the othersub-TLV carries a PCEP over TLS port. A PCE that supports the TCP MD5option and a PCE that supports the TCP AO share the sub-TLV that carriesthe PCEP over TCP port, and a PCE that supports the TLS uses the sub-TLVof the PCEP over TLS port. Optionally, if the transmission capabilityinformation of the PCE further includes the fourth flag bit, a PCE thatsupports the TLS and a PCE that supports the TLS and the TCP AO sharethe sub-TLV of the PCEP over TLS port.

In the other manner, three sub-TLVs are defined to respectively carry aPCEP over TCP MD5 option port, a PCEP over TCP AO port, and a PCEP overTLS port. Further, if the transmission capability information of the PCEfurther includes the fourth flag bit, a sub-TLV may be further definedto carry a PCEP over TLS and TCP AO port.

402. The PCC determines, according to a preset selection policy and thetransmission capability information of the PCE in the at least one routeadvertisement message, a PCE used for path computation.

The preset selection policy includes:

selecting a PCE that has a transmission capability supported by the PCC,to perform path computation. For example, if the PCC supports the TCPMD5 option, and the PCE supports the TCP MD5 and the TLS according tothe transmission capability information of the PCE, the PCE has thetransmission capability supported by the PCC. In this case, the PCCdetermines, according to the preset selection policy and thetransmission capability information of the PCE, that the PCE is used forpath computation. Further, the preset selection policy may also be:selecting, with reference to a priority of a PCE or load information ofa PCE or a preference of the PCC, a PCE that has a transmissioncapability supported by the PCC, to perform path computation. Forexample, with reference to the priority of the PCE, the preset selectionpolicy includes: if only one PCE has the transmission capabilitysupported by the PCC, selecting the PCE to perform path computation; orif multiple PCEs have the transmission capability supported by the PCC,selecting a PCE with a highest priority in the multiple PCEs to performpath computation.

It may be understood that in this embodiment of the present disclosure,the route advertisement message may include location information andtransmission capability information of only one PCE, or may includelocation information and transmission capability information of multiplePCEs. The PCC may determine, according to transmission capabilityinformation of one or more PCEs in one route advertisement message, oraccording to transmission capability information of all PCEs in multipleroute advertisement messages, a PCE used for path computation.

For example, the PCC receives a first route advertisement message and asecond route advertisement message, where the first route advertisementmessage includes location information and transmission capabilityinformation of a first PCE, and location information and transmissioncapability information of a second PCE, and the second routeadvertisement message includes location information and transmissioncapability information of a third PCE.

For example, Scenario 1: a PCC1 supports the TCP MD5 option, the firstPCE supports the TCP MD5 and the TLS according to the transmissioncapability information of the first PCE, the second PCE supports the TCPMD5 and the TCP AO according to the transmission capability informationof the second PCE, and the third PCE supports the TLS and the TCP AOaccording to the transmission capability information of the third PCE.

In Scenario 1, according to the preset selection policy, thetransmission capability information of the first PCE, the transmissioncapability information of the second PCE, and the transmissioncapability information of the third PCE, both the first PCE and thesecond PCE have a transmission capability supported by the PCC1, but thethird PCE does not have the transmission capability supported by thePCC1. Then, the PCC1 determines that the first PCE or the second PCE isused for path computation, or may determine that the first PCE and thesecond PCE are used for path computation, but does not select the thirdPCE to perform path computation. Optionally, the PCC1 furtherdetermines, according to a priority of the first PCE and a priority ofthe second PCE, that the second PCE with a higher priority is used forpath computation.

Alternatively, the preset selection policy includes: if the PCC supportsboth the TCP AO and the TCP MD5 option, preferentially selecting a PCEthat supports the TCP AO, to perform path computation, and if no PCEsupports the TCP AO, selecting a PCE that supports the TCP MD5 option,to perform path computation. Further, with reference to a priority of aPCE or load information of a PCE or a preference of the PCC, a PCE maybe selected to perform path computation, and the preset selection policyincludes: if the PCC supports both the TCP AO and the TCP MD5 option,preferentially selecting, with reference to the priority of the PCE orthe load information of the PCE or the preference of the PCC, a PCE thatsupports the TCP AO, to perform path computation, and if no PCE supportsthe TCP AO, selecting, with reference to the priority of the PCE or theload information of the PCE or the preference of the PCC, a PCE thatsupports the TCP MD5 option, to perform path computation. For example,with reference to the priority of the PCE, the preset selection policyincludes: if the PCC supports both the TCP AO and the TCP MD5 option,and if multiple PCEs support the TCP AO, selecting a PCE with a highestpriority to perform path computation, or if only one PCE supports theTCP AO, determining that the PCE is used for path computation; if no PCEsupports the TCP AO, and if multiple PCEs support the TCP MD5 option,selecting a PCE with a highest priority to perform path computation, orif only one PCE supports the TCP MD5 option, determining that the PCE isused for path computation.

For example, Scenario 2: a PCC2 supports the TCP AO and the TCP MD5option, the first PCE supports the TCP MD5 and the TLS according to thetransmission capability information of the first PCE, the second PCEsupports the TCP MD5 and the TCP AO according to the transmissioncapability information of the second PCE, and the third PCE supports theTLS and the TCP AO according to the transmission capability informationof the third PCE.

In Scenario 2, according to the preset selection policy, thetransmission capability information of the first PCE, the transmissioncapability information of the second PCE, and the transmissioncapability information of the third PCE, both the second PCE and thethird PCE support the TCP AO. Then, the PCC2 determines that the secondPCE or the third PCE is used for path computation, or may determine thatthe second PCE and the third PCE are used for path computation, but doesnot select the first PCE to perform path computation. Optionally, thePCC2 further determines, according to a priority of the second PCE and apriority of the third PCE, that the second PCE with a higher priority isused for path computation.

Alternatively, the preset selection policy includes: if the PCC supportsthe TLS and the TCP AO, determining, according to a securityrequirement, a PCE used for path computation, where the securityrequirement includes: transport layer security, sensitive data security,and transport layer and sensitive data security. The preset selectionpolicy includes: if the PCC supports the TLS and the TCP AO, when thesecurity requirement is the transport layer and sensitive data security,selecting a PCE that supports the TLS and the TCP AO, to perform pathcomputation, or when the security requirement is the transport layersecurity, selecting a PCE that supports the TCP AO, to perform pathcomputation, or when the security requirement is the sensitive datasecurity, selecting a PCE that supports the TLS, to perform pathcomputation. Further, with reference to a priority of a PCE, a PCE usedfor path computation may be determined, and the preset selection policyincludes: if the PCC supports the TLS and the TCP AO, determining,according to the security requirement and with reference to the priorityof the PCE or load information of the PCE or a preference of the PCC, aPCE used for path computation. The preset selection policy includes: ifthe PCC supports the TLS and the TCP AO, and when multiple PCEs meet thesecurity requirement, selecting, according to priorities of the multiplePCEs or load information of the multiple PCEs or the preference of thePCC, a PCE with a highest priority to perform path computation, or whenonly one PCE meets the security requirement, determining that the PCE isused for path computation.

For example, Scenario 3: a PCC3 supports the TLS and the TCP AO, thefirst PCE supports the TCP MD5 and the TLS according to the transmissioncapability information of the first PCE, the second PCE supports the TCPMD5 and the TCP AO according to the transmission capability informationof the second PCE, and the third PCE supports the TLS and the TCP AOaccording to the transmission capability information of the third PCE.

In Scenario 3:

When the security requirement is the transport layer and sensitive datasecurity, according to the preset selection policy, the transmissioncapability information of the first PCE, the transmission capabilityinformation of the second PCE, and the transmission capabilityinformation of the third PCE, the third PCE supports the TLS and the TCPAO. Then, the PCC3 determines that the third PCE is used for pathcomputation, but does not select the first PCE or the second PCE toperform path computation.

When the security requirement is the sensitive data security, accordingto the preset selection policy, the transmission capability informationof the first PCE, the transmission capability information of the secondPCE, and the transmission capability information of the third PCE, boththe first PCE and the third PCE support the TLS. Then, the PCC3determines that the first PCE or the third PCE is used for pathcomputation, or may determine that the first PCE and the third PCE areused for path computation, but does not select the second PCE to performpath computation. Optionally, the PCC3 further determines, according toa priority of the first PCE and a priority of the third PCE, that thefirst PCE with a higher priority is used for path computation.

When the security requirement is the transport layer security, accordingto the preset selection policy, the transmission capability informationof the first PCE, the transmission capability information of the secondPCE, and the transmission capability information of the third PCE, boththe second PCE and the third PCE support the TCP AO. Then, the PCC3determines that the second PCE or the third PCE is used for pathcomputation, or may determine that the second PCE and the third PCE areused for path computation, but does not select the first PCE to performpath computation. Optionally, the PCC3 further determines, according toa priority of the second PCE and a priority of the third PCE, that thesecond PCE with a higher priority is used for path computation.

Optionally, the security requirement may be further set according to apreference of the PCC. For example, if the transport layer and sensitivedata security is prior to the transport layer security and the transportlayer security is prior to the sensitive data security, the presetselection policy includes: if the PCC supports the TLS and the TCP AO,preferentially selecting a PCE that supports the TLS and the TCP AO, toperform path computation; if no PCE supports the TLS and the TCP AO,preferentially selecting a PCE that supports the TCP AO, to perform pathcomputation; and if no PCE supports the TCP AO, selecting a PCE thatsupports the TLS, to perform path computation.

In specific implementation, priority information of the PCE may becarried in the PCED TLV in the OSPF protocol or in the PCED sub-TLV inthe IS-IS protocol. In the foregoing examples of this embodiment of thepresent disclosure, the priority of the second PCE is higher than thepriority of the first PCE, and the priority of the first PCE is higherthan the priority of the third PCE, which constitutes no limitation tothe present disclosure.

Optionally, the load information of the PCE includes a load capability,a current load status, and the like of the PCE. When a PCE used for pathcomputation is selected with reference to the load information of thePCE, for example, a PCE that has a strong load capability and whosecurrent load is relatively light may be selected to perform pathcomputation. Certainly, the preset selection policy may also be combinedwith a local policy of the PCC. For example, the local policy is toselect a PCE that supports maximum transmission capabilities. Certainly,the local policy of the PCC may be statically configured, or may bedynamically adjusted according to a requirement.

It should be noted that, after the PCC selects the PCE according to thetechnical solution of the present disclosure, for establishing a PCEPsession with the PCE, submitting a path computation request, acquiring apath computation result, and the like, reference may be made to thecurrent standard specification, and details are not described hereinagain in this embodiment of the present disclosure.

According to the method for determining a path computation elementprovided in this embodiment of the present disclosure, a PCC receives aroute advertisement message that carries transmission capabilityinformation of a PCE, and selects, according to a transmissioncapability of the PCE and a preset selection policy, a PCE that matchesa transmission capability of the PCC, to perform path computation, whichcan ensure that a PCEP session is effectively established between thePCC and the PCE, and can improve a success rate and efficiency of pathcomputation between the PCC and the PCE.

Based on the foregoing methods shown in FIG. 1, FIG. 3, and FIG. 4, thefollowing uses specific application scenarios to describe a method foradvertising a transmission capability and determining a path computationelement according to the present disclosure.

It is assumed that in an OSPF area, a PCC supports TLS, a PCE1 supportsthe TLS, a PCE2 supports a TCP AO, and a PCE3 supports a TCP MD5 and theTCP AO. A preset selection policy is: if PCEs have a transmissioncapability supported by the PCC, selecting a PCE with a highestpriority, to perform path computation. Referring to FIG. 5, FIG. 5 is aflowchart of a method for advertising a transmission capability anddetermining a path computation element according to an embodiment of thepresent disclosure, where the method includes the following steps:

501. A router 1 generates a route advertisement message 1 and sends theroute advertisement message 1 to an area in which the router 1 islocated, where the route advertisement message 1 carries a PCE-ADDRESSsub-TLV and a PCE-CAP-FLAGS sub-TLV, the PCE-ADDRESS sub-TLV carries alocation of the PCE1, and the PCE-CAP-FLAGS sub-TLV indicates that thePCE1 supports the TLS.

502. The PCC receives the route advertisement message 1.

503. A router 2 generates a route advertisement message 2 and broadcaststhe route advertisement message 2 within the area, where the routeadvertisement message 2 carries a PCE-ADDRESS sub-TLV and aPCE-CAP-FLAGS sub-TLV, the PCE-ADDRESS sub-TLV carries a location of thePCE2, and the PCE-CAP-FLAGS sub-TLV indicates that the PCE2 supports theTCP AO.

504. The PCC receives the route advertisement message 2.

505. A router 3 generates a route advertisement message 3 and broadcaststhe route advertisement message 3 within the area, where the routeadvertisement message 3 carries a PCE-ADDRESS sub-TLV and aPCE-CAP-FLAGS sub-TLV, the PCE-ADDRESS sub-TLV carries a location of thePCE3, and the PCE-CAP-FLAGS sub-TLV indicates that the PCE3 supports theTCP MD5 and the TCP AO.

506. The PCC receives the route advertisement message 3.

It should be noted that a time sequence of steps 501 and 502, steps 503and 504, and steps 505 and 506 is not limited. Steps 505 and 506 may beperformed before steps 501 and 502, or may be performed after steps 501and 502 and before steps 503 and 504, and certainly, steps 501 and 502,steps 503 and 504, and steps 505 and 506 may be simultaneouslyperformed.

507. The PCC determines, according to transmission capabilityinformation of the PCE1, transmission capability information of thePCE2, transmission capability information of the PCE3, and the presetselection policy, that the PCE1 is a PCE used for path computation.

After selecting the PCE1, the PCC establishes a TLS connection with thePCE1, then establishes a PCEP session, submits a path computationrequest, and acquires a path computation result.

It is assumed that in an IS-IS area, a PCC supports a TCP AO and a TCPMD5 option, a PCE1 supports a TCP MD5 option, a PCE2 supports TLS, aPCE3 supports the TLS and the TCP MD5 option, a priority of the PCE1 ishigher than a priority of the PCE2, and the priority of the PCE2 ishigher than a priority of the PCE 3. A preset selection policy is: ifthe PCC supports both the TCP AO and the TCP MD5 option, and if multiplePCEs support the TCP AO, selecting a PCE with a highest priority toperform path computation, or if only one PCE supports the TCP AO,determining that the PCE is used for path computation; if no PCEsupports the TCP AO, and if multiple PCEs support the TCP MD5 option,selecting a PCE with a highest priority to perform path computation, orif only one PCE supports the TCP MD5 option, determining that the PCE isused for path computation. Referring to FIG. 6, FIG. 6 is a flowchart ofanother method for advertising a transmission capability and determininga path computation element according to an embodiment of the presentdisclosure, where the method includes the following steps:

601. A router 1 generates a route advertisement message 1 and broadcaststhe route advertisement message 1 within the area, where the routeadvertisement message 1 carries a PCE-ADDRESS sub-TLV and aPCE-CAP-FLAGS sub-TLV, the PCE-ADDRESS sub-TLV carries a location of thePCE1, and the PCE-CAP-FLAGS sub-TLV indicates that the PCE1 supports theTCP MD5.

602. The PCC receives the route advertisement message 1.

603. A router 2 generates a route advertisement message 2 and broadcaststhe route advertisement message 2 within the area, where the routeadvertisement message 2 carries a PCE-ADDRESS sub-TLV and aPCE-CAP-FLAGS sub-TLV, the PCE-ADDRESS sub-TLV carries a location of thePCE2, and the PCE-CAP-FLAGS sub-TLV indicates that the PCE2 supports theTLS.

604. The PCC receives the route advertisement message 2.

605. A router 3 generates a route advertisement message 3 and broadcaststhe route advertisement message 3 within the area, where the routeadvertisement message 3 carries a PCE-ADDRESS sub-TLV and aPCE-CAP-FLAGS sub-TLV, the PCE-ADDRESS sub-TLV carries a location of thePCE3, and the PCE-CAP-FLAGS sub-TLV indicates that the PCE3 supports theTLS and the TCP MD5.

606. The PCC receives the route advertisement message 3.

It should be noted that a time sequence of steps 601 and 602, steps 603and 604, and steps 605 and 606 is not limited. Steps 605 and 606 may beperformed before steps 601 and 602, or may be performed after steps 601and 602 and before steps 603 and 604, and certainly, steps 601 and 602,steps 603 and 604, and steps 605 and 606 may be simultaneouslyperformed.

607. The PCC determines, according to transmission capabilityinformation of the PCE1, transmission capability information of thePCE2, transmission capability information of the PCE3, and the presetselection policy, that the PCE1 is a PCE used for path computation.

The PCC supports the TCP AO and the TCP MD5 option, none of the PCE1,the PCE2, and the PCE3 supports the TCP AO, both the PCE1 and the PCE3support the TCP MD5 option, and the priority of the PCE1 is higher thanthat of the PCE3; therefore, the PCC selects the PCE1 to perform pathcomputation.

After selecting the PCE1, the PCC establishes a TLS connection with thePCE1, then establishes a PCEP session, submits a path computationrequest, and acquires a path computation result.

It is assumed in an OSPF area, a PCC supports TLS and a TCP AO, a PCE1supports a TCP MD5 and the TLS, a PCE2 supports the TCP MD5 and the TCPAO, and a PCE3 supports the TLS and the TCP AO. A preset selectionpolicy includes: if the PCC supports the TLS and the TCP AO,determining, according to a security requirement, a PCE used for pathcomputation. Referring to FIG. 7, FIG. 7 is a flowchart of still anothermethod for advertising a transmission capability and determining a pathcomputation element according to an embodiment of the presentdisclosure, where the method includes the following steps:

701. A router 1 generates a route advertisement message 1 and broadcaststhe route advertisement message 1 within the area, where the routeadvertisement message 1 carries a PCE-ADDRESS sub-TLV and aPCE-CAP-FLAGS sub-TLV, the PCE-ADDRESS sub-TLV carries a location of thePCE1, and the PCE-CAP-FLAGS sub-TLV indicates that the PCE1 supports theTCP MD5 and the TLS.

702. The PCC receives the route advertisement message 1.

703. A router 2 generates a route advertisement message 2 and broadcaststhe route advertisement message 2 within the area, where the routeadvertisement message 2 carries a PCE-ADDRESS sub-TLV and aPCE-CAP-FLAGS sub-TLV, the PCE-ADDRESS sub-TLV carries a location of thePCE2, and the PCE-CAP-FLAGS sub-TLV indicates that the PCE2 supports theTCP MD5 and the TCP AO.

704. The PCC receives the route advertisement message 2.

705. A router 3 generates a route advertisement message 3 and broadcaststhe route advertisement message 3 within the area, where the routeadvertisement message 3 carries a PCE-ADDRESS sub-TLV and aPCE-CAP-FLAGS sub-TLV, the PCE-ADDRESS sub-TLV carries a location of thePCE3, and the PCE-CAP-FLAGS sub-TLV indicates that the PCE3 supports theTLS and the TCP AO.

706. The PCC receives the route advertisement message 3.

It should be noted that a time sequence of steps 701 and 702, steps 703and 704, and steps 705 and 706 is not limited. Steps 705 and 706 may beperformed before steps 701 and 702, or may be performed after steps 701and 702 and before steps 703 and 704, and certainly, steps 701 and 702,steps 703 and 704, and steps 705 and 706 may be simultaneouslyperformed.

707. The PCC determines, according to transmission capabilityinformation of the PCE1, transmission capability information of thePCE2, transmission capability information of the PCE3, and the presetselection policy, a PCE used for path computation.

If the security requirement is transport layer and sensitive datasecurity, the PCC determines, according to the transmission capabilityinformation of the PCE1, the transmission capability information of thePCE2, the transmission capability information of the PCE3, and thepreset selection policy, that the PCE3 is used for path computation.After selecting the PCE3, the PCC establishes a TLS and TCP AOconnection with the PCE3, then establishes a PCEP session, that is,establishes PCEP over TLS and TCP AO, submits a path computationrequest, and acquires a path computation result.

If the security requirement is sensitive data security, the PCCdetermines, according to the transmission capability information of thePCE1, the transmission capability information of the PCE2, thetransmission capability information of the PCE3, and the presetselection policy, that both the PCE1 and the PCE3 support the TLS, andthe PCC determines, according to priorities of the PCE1 and the PCE3,that the PCE1 is used for path computation. After selecting the PCE1,the PCC establishes a TLS connection with the PCE1, then establishes aPCEP session, that is, establishes PCEP over TLS, submits a pathcomputation request, and acquires a path computation result.

If the security requirement is transport layer security, the PCCdetermines, according to the transmission capability information of thePCE1, the transmission capability information of the PCE2, thetransmission capability information of the PCE3, and the presetselection policy, that both the PCE2 and the PCE3 support the TCP AO,and the PCC determines, according to priorities of the PCE2 and thePCE3, that the PCE2 is used for path computation. After selecting thePCE2, the PCC establishes a TCP AO connection with the PCE2, thenestablishes a PCEP session, that is, establishes PCEP over TCP AO,submits a path computation request, and acquires a path computationresult.

As shown in FIG. 8, FIG. 8 is a structural block diagram of acommunications device according to an embodiment of the presentdisclosure. The communications device in this embodiment is a PCCnetwork element and is configured to implement the method shown in FIG.4 in the present disclosure. The communications device includes: areceiving unit 801 and a determining unit 802.

The receiving unit 801 is configured to receive at least one routeadvertisement message, where the route advertisement message includeslocation information and transmission capability information of a PCE,and the transmission capability information of the PCE includes a firstflag bit, a second flag bit, and a third flag bit, where the first flagbit is used to indicate whether the PCE supports a Transmission ControlProtocol TCP digest algorithm 5 option, the second flag bit is used toindicate whether the PCE supports a TCP authentication option AO, andthe third flag bit is used to indicate whether the PCE supportsTransport Layer Security TLS.

It may be understood that if the second flag bit indicates that the PCEsupports the TCP AO and the third flag bit indicates that the PCEsupports the TLS, the second flag bit and the third flag bit togetherindicate that the PCE supports the TLS and the TCP AO. Certainly,optionally, the transmission capability information of the PCE furtherincludes a fourth flag bit, where the fourth flag bit is used toindicate whether the PCE supports the TLS and the TCP AO.

Optionally, when a flag bit is 0, it indicates not supporting; when aflag bit is 1, it indicates supporting. For example, in the routeadvertisement message, if the first flag bit is 1, it indicates that thePCE supports the TCP MD5; if the second flag bit is 0, it indicates thatthe PCE does not support the TCP AO; and if the third flag bit is 1, itindicates that the PCE supports the TLS.

Further, the route advertisement message may further include portinformation of the PCE, where the port information includes a port typeand a port number. The port type includes a path computation protocolPCEP over TCP port, and a PCEP over TLS port; or the port type includesa PCEP over TCP digest algorithm 5 option port, a PCEP over TCP AO port,and a PCEP over TLS port, and optionally, further includes a PCEP overTLS and TCP AO port.

The determining unit 802 is configured to determine, according to apreset selection policy and the transmission capability information ofthe PCE in the at least one route advertisement message, a PCE used forpath computation.

The route advertisement message may be an IGP route advertisementmessage (specifically, reference may be made to the method shown in FIG.1 in the present disclosure) or a BGP route advertisement message(specifically, reference may be made to the method shown in FIG. 3 inthe present disclosure), where the IGP route advertisement message maybe an OSPF LSA or an IS-IS LSA. In specific implementation, the locationinformation of the PCE, such as an IPv4 address or an IPv6 address, maybe carried in a PCE-ADDRESS sub-TLV of a PCED TLV in the OSPF LSA or ofa PCED sub-TLV in the IS-IS LSA. By extending a PCED TLV in the OSPFprotocol or a PCED sub-TLV in the IS-IS protocol, the transmissioncapability information of the PCE may be used to respectively definethree currently unused flag bits in a PCE-CAP-FLAGS sub-TLV as theforegoing first flag bit, second flag bit, and third flag bit; further,the fourth flag bit may be further defined. A specific format of thePCED TLV in the OSPF protocol or the PCED sub-TLV in the IS-IS protocolmay be shown in FIG. 2a . A correspondence between four extended flagbits in the PCE-ADDRESS sub-TLV in FIG. 2a and PCE capabilitydescriptions may be as follows:

Flag Bit (bits) Capability Description (capability description) 12Indicating whether to support a TCP MD5 (PCEP over TCP MD5) 13Indicating whether to support a TCP AO (PCEP over TCP AO) 14 Indicatingwhether to support TLS (PCEP over TLS) 15 Indicating whether to supportTLS and a TCP AO (PCEP over TLS and TCP AO)

It should be noted that in FIG. 2a , defining of the four flag bits,namely, 12, 13, 14, and 15 is used as an example, and the foregoingcapability descriptions corresponding to all flag bits are also usedmerely as an example, and constitute no limitation to the presentdisclosure.

Further, the IGP route advertisement message may further include theport information of the PCE, the PCED TLV in the OSPF protocol or thePCED sub-TLV in the IS-IS protocol may be extended, a sub-TLV thatcarries the port information of the PCE is defined, and a format may beshown in FIG. 2b . The port information of the PCE may be carried in twoimplementation manners:

In one manner, two sub-TLVs are defined to carry the port information ofthe PCE, where one sub-TLV carries a PCEP over TCP port, and the othersub-TLV carries a PCEP over TLS port. A PCE that supports the TCP MD5option and a PCE that supports the TCP AO share the sub-TLV that carriesthe PCEP over TCP port, and a PCE that supports the TLS uses the sub-TLVof the PCEP over TLS port. Optionally, if the transmission capabilityinformation of the PCE further includes the fourth flag bit, a PCE thatsupports the TLS and a PCE that supports the TLS and the TCP AO sharethe sub-TLV of the PCEP over TLS port.

In the other manner, three sub-TLVs are defined to respectively carry aPCEP over TCP MD5 option port, a PCEP over TCP AO port, and a PCEP overTLS port. Further, if the transmission capability information of the PCEfurther includes the fourth flag bit, a sub-TLV may be further definedto carry a PCEP over TLS and TCP AO port.

The BGP route advertisement message includes the location informationand the transmission capability information of the PCE, which can beimplemented by extending the BGP protocol. For example, a PCE-ADDRESSsub-TLV and a PCE-CAP-FLAGS sub-TLV are defined in an NLRI TLV in theBGP protocol and are carried in the BGP route advertisement message,where the PCE-ADDRESS sub-TLV is used to carry the location informationof the PCE, and the PCE-CAP-FLAGS sub-TLV is used to carry thetransmission capability information of the PCE. A specific format may bethe same as the extended PCED TLV in the OSPF protocol or the extendedPCED sub-TLV in the IS-IS protocol, as shown in FIG. 2 a.

Further, the BGP route advertisement message may further include theport information of the PCE, where the port information includes a porttype and a port number. Corresponding to the IGP route advertisementmessage, the port type includes a PCEP over TCP port, and a PCEP overTLS port; or the port type includes a PCEP over TCP MD5 port, a PCEPover TCP AO port, and a PCEP over TLS port, and further, may furtherinclude a PCEP over TLS and TCP AO port. In specific implementation, theBGP protocol may be extended. For example, the sub-TLV that carries theport information of the PCE is defined in NLRI, and a format may beshown in FIG. 2b . Corresponding to extension of the OSPF protocol orthe IS-IS protocol, the port information of the PCE may also be carriedin two implementation manners:

In one manner, two sub-TLVs are defined to carry the port information ofthe PCE, where one sub-TLV carries a PCEP over TCP port, and the othersub-TLV carries a PCEP over TLS port. A PCE that supports the TCP MD5option and a PCE that supports the TCP AO share the sub-TLV that carriesthe PCEP over TCP port, and a PCE that supports the TLS uses the sub-TLVof the PCEP over TLS port. Optionally, if the transmission capabilityinformation of the PCE further includes the fourth flag bit, a PCE thatsupports the TLS and a PCE that supports the TLS and the TCP AO sharethe sub-TLV of the PCEP over TLS port.

In the other manner, three sub-TLVs are defined to respectively carry aPCEP over TCP MD5 option port, a PCEP over TCP AO port, and a PCEP overTLS port. Further, if the transmission capability information of the PCEfurther includes the fourth flag bit, a sub-TLV may be further definedto carry a PCEP over TLS and TCP AO port.

It may be understood that in this embodiment of the present disclosure,the route advertisement message may include location information andtransmission capability information of only one PCE, or may includelocation information and transmission capability information of multiplePCEs. The PCC may determine, according to transmission capabilityinformation of one or more PCEs in one route advertisement message, oraccording to transmission capability information of all PCEs in multipleroute advertisement messages, a PCE used for path computation.

The preset selection policy includes:

selecting a PCE that has a transmission capability supported by the PCC,to perform path computation.

If the PCC supports both the TCP AO and the TCP MD5 option, a PCE thatsupports the TCP AO is preferentially selected to perform pathcomputation, and if no PCE supports the TCP AO, a PCE that supports theTCP MD5 is selected to perform path computation.

If the PCC supports the TLS and the TCP AO, a PCE used for pathcomputation is determined according to a security requirement, where thesecurity requirement includes: transport layer security, sensitive datasecurity, and transport layer and sensitive data security. If the PCCsupports the TLS and the TCP AO, when the security requirement is thetransport layer and sensitive data security, a PCE that supports the TLSand the TCP AO is selected to perform path computation, or when thesecurity requirement is the transport layer security, a PCE thatsupports the TCP AO is selected to perform path computation, or when thesecurity requirement is the sensitive data security, a PCE that supportsthe TLS is selected to perform path computation.

Further, with reference to a priority of a PCE or load information of aPCE or a preference of the PCC, a PCE may be determined to perform pathcomputation, and the preset selection policy includes:

selecting, with reference to the priority of the PCE or the loadinformation of the PCE or the preference of the PCC, a PCE that has atransmission capability supported by the PCC, to perform pathcomputation. For example, with reference to the priority of the PCE, thepreset selection policy includes: if only one PCE has the transmissioncapability supported by the PCC, selecting the PCE to perform pathcomputation; or if multiple PCEs have the transmission capabilitysupported by the PCC, selecting a PCE with a highest priority in themultiple PCEs to perform path computation.

If the PCC supports both the TCP AO and the TCP MD5 option, a PCE thatsupports the TCP AO is preferentially selected with reference to thepriority of the PCE or the load information of the PCE or the preferenceof the PCC, to perform path computation, and if no PCE supports the TCPAO, a PCE that supports the TCP MD5 is selected with reference to thepriority of the PCE or the load information of the PCE or the preferenceof the PCC, to perform path computation. For example, with reference tothe priority of the PCE, if the PCC supports both the TCP AO and the TCPMD5 option, and if multiple PCEs support the TCP AO, a PCE with ahighest priority is selected to perform path computation, or if only onePCE supports the TCP AO, it is determined that the PCE is used for pathcomputation; if no PCE supports the TCP AO, and if multiple PCEs supportthe TCP MD5 option, a PCE with a highest priority is selected to performpath computation, or if only one PCE supports the TCP MD5 option, it isdetermined that the PCE is used for path computation.

If the PCC supports the TLS and the TCP AO, a PCE used for pathcomputation is determined according to the security requirement and withreference to the priority of the PCE or the load information of the PCEor the preference of the PCC. If the PCC supports the TLS and the TCPAO, and when multiple PCEs meet the security requirement, a PCE with ahighest priority may be selected according to priorities of the multiplePCEs or load information of the PCEs or the preference of the PCC, toperform path computation, or when only one PCE meets the securityrequirement, it is determined that the PCE is used for path computation.

In specific implementation, with reference to the current standardspecification, priority information of the PCE may be carried in thePCED TLV in the OSPF protocol or in the PCED sub-TLV in the IS-ISprotocol.

Optionally, the load information of the PCE includes a load capability,a current load status, and the like of the PCE. When a PCE used for pathcomputation is selected with reference to the load information of thePCE, for example, a PCE that has a strong load capability and whosecurrent load is relatively light may be selected to perform pathcomputation. Certainly, the preset selection policy may also be combinedwith a local policy of the PCC. For example, the local policy is toselect a PCE that supports maximum transmission capabilities. Certainly,the local policy of the PCC may be statically configured, or may bedynamically adjusted according to a requirement.

It should be noted that, after the PCC selects the PCE according to thetechnical solution of the present disclosure, for establishing a PCEPsession with the PCE, submitting a path computation request, acquiring apath computation result, and the like, reference may be made to thecurrent standard specification, and details are not described hereinagain in this embodiment of the present disclosure.

The PCC provided in this embodiment of the present disclosure receives aroute advertisement message that carries transmission capabilityinformation of a PCE, and selects, according to a transmissioncapability of the PCE and a preset selection policy, a PCE that matchesa transmission capability of the PCC, to perform path computation, whichcan improve a success rate of establishing a PCEP session between thePCC and the PCE, and can improve efficiency of path computation.

As shown in FIG. 9, FIG. 9 is a structural block diagram of anothercommunications device according to an embodiment of the presentdisclosure. The communications device in this embodiment is a BGP routerand is configured to implement the method shown in FIG. 3 in the presentdisclosure. The communications device includes: a receiving unit 901, agenerating unit 902, and a sending unit 903.

The receiving unit 901 is configured to receive at least one IGP routeadvertisement message from an autonomous system AS domain, where the IGProute advertisement message includes location information andtransmission capability information of a path computation element PCE,and the transmission capability information of the PCE includes a firstflag bit, a second flag bit, and a third flag bit, where the first flagbit is used to indicate whether the PCE supports a Transmission ControlProtocol TCP digest algorithm 5 option, the second flag bit is used toindicate whether the PCE supports a TCP authentication option AO, andthe third flag bit is used to indicate whether the PCE supportsTransport Layer Security TLS. Optionally, the transmission capabilityinformation of the PCE further includes a fourth flag bit, where thefourth flag bit is used to indicate whether the PCE supports the TLS andthe TCP AO.

The IGP route advertisement message is an OSPF LSA or an IS-IS LSA.

The BGP router may be a BGP speaker.

In specific implementation, by extending a PCE-CAP-FLAGS sub-TLV of aPCED TLV in the OSPF protocol or of a PCED sub-TLV in the IS-ISprotocol, the transmission capability information of the PCE may be usedto define three currently unused flag bits in the PCE-CAP-FLAGS sub-TLVas the foregoing first flag bit, second flag bit, and third flag bit,which are respectively used to indicate whether the PCE supports the TCPMD5 option, whether the PCE supports the TCP AO, and whether the PCEsupports the TLS. Further, the fourth flag bit may be further definedand is used to indicate whether the PCE supports the TLS and the TCP AO.

A format of the PCED TLV in the OSPF protocol or the PCED sub-TLV in theIS-IS protocol may be shown in FIG. 2a . A correspondence between fourextended flag bits in the PCE-ADDRESS sub-TLV in FIG. 2a and PCEcapability descriptions may be as follows:

Flag Bit (bits) Capability Description (capability description) 12Indicating whether to support a TCP MD5 (PCEP over TCP MD5) 13Indicating whether to support a TCP AO (PCEP over TCP AO) 14 Indicatingwhether to support TLS (PCEP over TLS) 15 Indicating whether to supportTLS and a TCP AO (PCEP over TLS and TCP AO)

It should be noted that in FIG. 2a , defining of the four flag bits,namely, 12, 13, 14, and 15 is used as an example, and the foregoing flagbits and the corresponding capability descriptions are also used merelyas an example, and constitute no limitation to the present disclosure.

The generating unit 902 is configured to generate a Border GatewayProtocol (BGP) route advertisement message according to the at least oneIGP route advertisement message, where the BGP route advertisementmessage includes the location information and the transmissioncapability information of the PCE in the at least one IGP routeadvertisement message.

For example, it is assumed that the communications device receives twoIGP route advertisement messages: a first IGP route advertisementmessage and a second IGP route advertisement message, where the firstIGP route advertisement message includes location information andtransmission capability information of a first PCE, the second routeadvertisement message includes location information and transmissioncapability information of a second PCE, and the first IGP routeadvertisement message and the second IGP route advertisement messagecome from an AS domain. The communications device generates the BGProute advertisement message according to the first route advertisementmessage and the second route advertisement message, where the BGP routeadvertisement message includes the location information and thetransmission capability information of the first PCE and the locationinformation and the transmission capability information of the secondPCE.

In this embodiment of the present disclosure, the communications devicemay generate a BGP route advertisement message according to only one IGProute advertisement message, or may generate a BGP route advertisementmessage according to multiple IGP route advertisement messages receivedfrom an AS domain, and send, to another AS domain by using the BGP routeadvertisement message, location information and transmission capabilityinformation of all PCEs carried in the multiple IGP route advertisementmessages.

In specific implementation, the BGP protocol may be extended. Forexample, the PCE-ADDRESS sub-TLV and the PCE-CAP-FLAGS sub-TLV aredefined in an NLRI TLV and are carried in the BGP route advertisementmessage. Optionally, by extending a capability optional parameter in theBGP protocol, the transmission capability information of the PCE mayalso be used to define a currently unused capability code, where thecode is used to identify a transmission capability of the PCE. Forextension of the BGP protocol, reference may be made to the method shownin FIG. 3 in the present disclosure, and details are not describedherein again.

The sending unit 903 is configured to send the BGP route advertisementmessage to an autonomous system AS domain other than the AS.

Assuming that the at least one IGP route advertisement message comesfrom a first AS domain and the BGP router is located on a border betweenthe first AS and a second AS, the sending unit 903 sends the BGP routeadvertisement message to the second AS to advertise the transmissioncapability of the PCE to a member within the second AS.

Further, the IGP route advertisement message may further include portinformation of the PCE, where the port information includes a port typeand a port number. The port type includes a PCEP over TCP port, and aPCEP over TLS port; or the port type includes: a PCEP over TCP MD5option port, a PCEP over TCP AO port, and a PCEP over TLS port, andfurther, may further include a PCEP over TLS and TCP AO port. Inspecific implementation, the PCED TLV in the OSPF protocol or the PCEDsub-TLV in the IS-IS protocol may be extended, a sub-TLV that carriesthe port information of the PCE is defined, and a format may be shown inFIG. 2b . Specifically, reference may be made to the method shown inFIG. 1 in the present disclosure, and details are not described hereinagain.

Accordingly, the BGP route advertisement message may further include theport information of the PCE. In specific implementation, the BGPprotocol may be extended. For example, the sub-TLV that carries the portinformation of the PCE is defined in NLRI, and a format may be shown inFIG. 2b . Being similar to extension of the OSPF protocol or the IS-ISprotocol, the port information of the PCE may also be carried in twoimplementation manners:

In one manner, two sub-TLVs are defined to carry the port information ofthe PCE, where one sub-TLV carries a PCEP over TCP port, and the othersub-TLV carries a PCEP over TLS port. A PCE that supports the TCP MD5option and a PCE that supports the TCP AO share the sub-TLV that carriesthe PCEP over TCP port, and a PCE that supports the TLS uses the sub-TLVof the PCEP over TLS port. Optionally, if the transmission capabilityinformation of the PCE further includes the fourth flag bit, a PCE thatsupports the TLS and a PCE that supports the TLS and the TCP AO sharethe sub-TLV of the PCEP over TLS port.

In the other manner, three sub-TLVs are defined to respectively carry aPCEP over TCP MD5 option port, a PCEP over TCP AO port, and a PCEP overTLS port. Further, if the transmission capability information of the PCEfurther includes the fourth flag bit, a sub-TLV may be further definedto carry a PCEP over TLS and TCP AO port.

Optionally, the communications device further includes a check unit,configured to: after the receiving unit 901 receives the IGP routeadvertisement message and before the generating unit 902 generates theBGP route advertisement message, check whether the IGP routeadvertisement message includes the transmission capability informationof the PCE. If the check unit determines that the IGP routeadvertisement message includes the transmission capability informationof the PCE, the generating unit 902 generates the BGP routeadvertisement message that includes the location information and thetransmission capability information of the PCE; or if the check unitdetermines that the IGP route advertisement message does not include thetransmission capability information of the PCE, the communicationsdevice performs processing according to the current standardspecification.

It may be understood that the IGP route advertisement message mayinclude location information and transmission capability information ofonly one PCE, or may include location information and transmissioncapability information of multiple PCEs. Accordingly, the BGP routeadvertisement message includes the location information and thetransmission capability information of the multiple PCEs in the IGProute advertisement message.

The communications device provided in this embodiment of the presentdisclosure implements advertisement of a PCE transmission capabilitybetween ASs by using an extended BGP protocol, which can ensure that aPCEP session is effectively established between a PCC and a PCE ininter-ASs, and can improve efficiency and a success rate of pathcomputation between the PCC and the PCE.

As shown in FIG. 10, FIG. 10 is a structural block diagram of stillanother communications device according to an embodiment of the presentdisclosure. The communications device in this embodiment is an IGProuter and is configured to implement the method shown in FIG. 1 in thepresent disclosure. The communications device includes: a generatingunit 1001 and a sending unit 1002.

The generating unit 1001 is configured to generate an IGP routeadvertisement message, where the route advertisement message includeslocation information and transmission capability information of a firstPCE, and the transmission capability information of the first PCEincludes a first flag bit, a second flag bit, and a third flag bit,where the first flag bit is used to indicate whether the first PCEsupports a Transmission Control Protocol TCP message-digest algorithm 5MD5 option, the second flag bit is used to indicate whether the firstPCE supports a TCP authentication option AO, and the third flag bit isused to indicate whether the first PCE supports Transport Layer SecurityTLS.

It may be understood that if the second flag bit indicates that thefirst PCE supports the TCP AO and the third flag bit indicates that thefirst PCE supports the TLS, the second flag bit and the third flag bittogether indicate that the first PCE supports the TLS and the TCP AO.Certainly, optionally, the transmission capability information of thefirst PCE further includes a fourth flag bit, where the fourth flag bitis used to indicate whether the first PCE supports the TLS and the TCPAO.

The sending unit 1002 is configured to send the IGP route advertisementmessage to an area in which the communications device is located, whichgenerally may also mean that the IGP route advertisement message isflooded, so as to advertise a transmission capability of the first PCEto a member within the area in which the communications device islocated.

Further, the route advertisement message may further include portinformation of the first PCE, where the port information includes a porttype and a port number. The port type includes a PCEP over TCP port, anda PCEP over TLS port; or the port type includes a PCEP over TCP MD5option port, a PCEP over TCP AO port, and a PCEP over TLS port. Further,optionally, if the transmission capability information of the first PCEfurther includes the fourth flag bit, accordingly, the port typeincludes a PCEP over TLS and TCP AO port.

IGP includes OSPF and IS-IS. Accordingly, the communications device isan OSPF router, the area in which the communications device is locatedis an OSPF area, and the route advertisement message is an OSPF LSA; orthe communications device is an IS-IS router, the area in which thecommunications device is located is an IS-IS area, and the routeadvertisement message is an IS-IS LSA.

In specific implementation, the location information of the first PCE,such as an IPv4 address or an IPv6 address, may be carried in aPCE-ADDRESS sub-TLV of a PCED TLV in the OSPF protocol or of a PCEDsub-TLV in the IS-IS protocol. By extending the PCED TLV in the OSPFprotocol or the PCED sub-TLV in the IS-IS protocol, three currentlyunused flag bits are defined in a PCE-CAP-FLAGS sub-TLV as the foregoingfirst flag bit, second flag bit, and third flag bit, which arerespectively used to indicate whether the first PCE supports the TCP MD5option, whether the first PCE supports the TCP AO, and whether the firstPCE supports the TLS. Further, the fourth flag bit may be furtherdefined and is used to indicate whether the first PCE supports the TLSand the TCP AO.

A format of the PCED TLV in the OSPF protocol or the PCED sub-TLV in theIS-IS protocol may be shown in FIG. 2a . A correspondence between fourextended flag bits in the PCE-ADDRESS sub-TLV in FIG. 2a and PCEcapability descriptions may be as follows:

Flag Bit (bits) Capability Description (capability description) 12Indicating whether to support a TCP MD5 (PCEP over TCP MD5) 13Indicating whether to support a TCP AO (PCEP over TCP AO) 14 Indicatingwhether to support TLS (PCEP over TLS) 15 Indicating whether to supportTLS and a TCP AO (PCEP over TLS and TCP AO)

It should be noted that in FIG. 2a , defining of the four flag bits,namely, 12, 13, 14, and 15 is used as an example, and the foregoing flagbits and the corresponding capability descriptions are also used merelyas an example, and constitute no limitation to the present disclosure.

Further, the PCED TLV in the OSPF protocol or the PCED sub-TLV in theIS-IS protocol may be further extended, a sub-TLV that carries the portinformation of the first PCE is defined, and a format may be shown inFIG. 2b . The port information of the first PCE may be carried in twoimplementation manners:

In one manner, two sub-TLVs are defined to carry the port information ofthe PCE, where one sub-TLV carries a PCEP over TCP port, and the othersub-TLV carries a PCEP over TLS port. A PCE that supports the TCP MD5option and a PCE that supports the TCP AO share the sub-TLV that carriesthe PCEP over TCP port, and a PCE that supports the TLS uses the sub-TLVof the PCEP over TLS port. Optionally, if the transmission capabilityinformation of the first PCE further includes the fourth flag bit, a PCEthat supports the TLS and a PCE that supports the TLS and the TCP AOshare the sub-TLV of the PCEP over TLS port.

In the other manner, three sub-TLVs are defined to respectively carry aPCEP over TCP MD5 option port, a PCEP over TCP AO port, and a PCEP overTLS port. Further, if the transmission capability information of thefirst PCE further includes the fourth flag bit, a sub-TLV may be furtherdefined to carry a PCEP over TLS and TCP AO port.

Further, the communications device may further include a receiving unit,configured to receive registration information of the first PCE beforethe route advertisement message is generated, where the registrationinformation includes the transmission capability of the first PCE. Theregistration information may further include a path computation scope, aneighbor PCE, a communication capability, a path computation capability,and the like of the first PCE.

Further, the route advertisement message may further include locationinformation and transmission capability information of a second PCE, andoptionally, further includes port information of the second PCE.Accordingly, the receiving unit is further configured to receiveregistration information of the second PCE before the routeadvertisement message is generated, where the registration informationincludes a transmission capability of the second PCE.

According to the communications device provided in this embodiment ofthe present disclosure, a PCED TLV in the OSPF protocol or a PCEDsub-TLV in the IS-IS protocol is extended, and a flag bit is defined toindicate a transmission capability of a PCE, so that advertisement ofthe transmission capability of the PCE can be implemented, and a PCC canselect a PCE that matches a transmission capability of the PCC, whichensures that a PCEP session is effectively established between the PCCand the PCE, and improves efficiency and a success rate of pathcomputation between the PCC and the PCE.

As shown in FIG. 11, FIG. 11 is a schematic structural diagram of acommunications device 1100 according to an embodiment of the presentdisclosure. The communications device in this embodiment is a PCCnetwork element and is configured to implement the method shown in FIG.4 in the present disclosure. The communications device 1100 includes: aprocessor 1101, a memory 1102, a communications interface 1103, and abus 1104.

The processor 1101, the memory 1102, and the communications interface1103 are connected to each other by using the bus 1104. The bus 1104 maybe a peripheral component interconnect (PCI) bus, an Extended IndustryStandard Architecture (EISA) bus, or the like. The bus may be classifiedinto an address bus, a data bus, a control bus, and the like. Forconvenience of representation, the bus is represented by using only onethick line in FIG. 11; however, it does not indicate that there is onlyone bus or only one type of bus.

The memory 1102 is configured to store a program. The program mayinclude program code, where the program code includes a computeroperation instruction. The memory 1102 may include a high-speed randomaccess memory (RAM), or may include a non-volatile memory, for example,at least one disk memory.

The communications interface 1103 is configured to communicate withanother communications device.

The processor 1101 executes the program stored by the memory 1102 andexecutes a method for determining a path computation element accordingto this embodiment of the present disclosure, where the method includes:

receiving at least one route advertisement message, where the routeadvertisement message includes location information and transmissioncapability information of a PCE, and the transmission capabilityinformation of the PCE includes a first flag bit, a second flag bit, anda third flag bit, where the first flag bit is used to indicate whetherthe PCE supports a Transmission Control Protocol TCP digest algorithm 5option, the second flag bit is used to indicate whether the PCE supportsa TCP authentication option AO, and the third flag bit is used toindicate whether the PCE supports Transport Layer Security TLS;optionally, the transmission capability information of the PCE furtherincludes a fourth flag bit, where the fourth flag bit is used toindicate whether the PCE supports the TLS and the TCP AO; and

determining, according to a preset selection policy and the transmissioncapability information of the PCE in the at least one routeadvertisement message, a PCE used for path computation.

Further, the route advertisement message may further include portinformation of the PCE, where the port information includes a port typeand a port number. The port type includes a path computation protocolPCEP over TCP port, and a PCEP over TLS port; or the port type includesa PCEP over TCP digest algorithm 5 option port, a PCEP over TCP AO port,and a PCEP over TLS port, and optionally, further includes a PCEP overTLS and TCP AO port.

The route advertisement message may be an IGP route advertisementmessage (specifically, reference may be made to the method shown in FIG.1 in the present disclosure) or a BGP route advertisement message(specifically, reference may be made to the method shown in FIG. 3 inthe present disclosure), where the IGP route advertisement message maybe an OSPF LSA or an IS-IS LSA. In specific implementation, the locationinformation of the PCE, such as an IPv4 address or an IPv6 address, maybe carried in a PCE-ADDRESS sub-TLV of a PCED TLV in the OSPF LSA or ofa PCED sub-TLV in the IS-IS LSA. By extending a PCED TLV in the OSPFprotocol or a PCED sub-TLV in the IS-IS protocol, the transmissioncapability information of the PCE may be used to respectively definethree currently unused flag bits in a PCE-CAP-FLAGS sub-TLV as theforegoing first flag bit, second flag bit, and third flag bit; further,the fourth flag bit may be further defined. A specific format of thePCED TLV in the OSPF protocol or the PCED sub-TLV in the IS-IS protocolmay be shown in FIG. 2a . A correspondence between four extended flagbits in the PCE-ADDRESS sub-TLV in FIG. 2a and PCE capabilitydescriptions may be as follows:

Flag Bit (bits) Capability Description (capability description) 12Indicating whether to support a TCP MD5 (PCEP over TCP MD5) 13Indicating whether to support a TCP AO (PCEP over TCP AO) 14 Indicatingwhether to support TLS (PCEP over TLS) 15 Indicating whether to supportTLS and a TCP AO (PCEP over TLS and TCP AO)

It should be noted that in FIG. 2a , defining of the four flag bits,namely, 12, 13, 14, and 15 is used as an example, and the foregoingcapability descriptions corresponding to all flag bits are also usedmerely as an example, and constitute no limitation to the presentdisclosure.

Further, the IGP route advertisement message may further include theport information of the PCE, the PCED TLV in the OSPF protocol or thePCED sub-TLV in the IS-IS protocol may be extended, a sub-TLV thatcarries the port information of the PCE is defined, and a format may beshown in FIG. 2b . The port information of the PCE may be carried in twoimplementation manners:

In one manner, two sub-TLVs are defined to carry the port information ofthe PCE, where one sub-TLV carries a PCEP over TCP port, and the othersub-TLV carries a PCEP over TLS port. A PCE that supports the TCP MD5option and a PCE that supports the TCP AO share the sub-TLV that carriesthe PCEP over TCP port, and a PCE that supports the TLS uses the sub-TLVof the PCEP over TLS port. Optionally, if the transmission capabilityinformation of the PCE further includes the fourth flag bit, a PCE thatsupports the TLS and a PCE that supports the TLS and the TCP AO sharethe sub-TLV of the PCEP over TLS port.

In the other manner, three sub-TLVs are defined to respectively carry aPCEP over TCP MD5 option port, a PCEP over TCP AO port, and a PCEP overTLS port. Further, if the transmission capability information of the PCEfurther includes the fourth flag bit, a sub-TLV may be further definedto carry a PCEP over TLS and TCP AO port.

The BGP route advertisement message includes the location informationand the transmission capability information of the PCE, which can beimplemented by extending the BGP protocol. For example, a PCE-ADDRESSsub-TLV and a PCE-CAP-FLAGS sub-TLV are defined in an NLRI TLV in theBGP protocol and are carried in the BGP route advertisement message,where the PCE-ADDRESS sub-TLV is used to carry the location informationof the PCE, and the PCE-CAP-FLAGS sub-TLV is used to carry thetransmission capability information of the PCE. A specific format may bethe same as the extended PCED TLV in the OSPF protocol or the extendedPCED sub-TLV in the IS-IS protocol, as shown in FIG. 2a . Further, theBGP route advertisement message may further include the port informationof the PCE, where the port information includes a port type and a portnumber. Corresponding to the IGP route advertisement message, the porttype includes a PCEP over TCP port, and a PCEP over TLS port; or theport type includes a PCEP over TCP MD5 port, a PCEP over TCP AO port,and a PCEP over TLS port, and further, may further include a PCEP overTLS and TCP AO port. In specific implementation, the BGP protocol may beextended. For example, the sub-TLV that carries the port information ofthe PCE is defined in NLRI, and a format may be shown in FIG. 2b .Corresponding to extension of the OSPF protocol or the IS-IS protocol,the port information of the PCE may also be carried in the foregoing twoimplementation manners.

It may be understood that in this embodiment of the present disclosure,the route advertisement message may include location information andtransmission capability information of only one PCE, or may includelocation information and transmission capability information of multiplePCEs. The PCC may determine, according to transmission capabilityinformation of one or more PCEs in one route advertisement message, oraccording to transmission capability information of all PCEs in multipleroute advertisement messages, a PCE used for path computation.

The preset selection policy includes:

selecting a PCE that has a transmission capability supported by the PCC,to perform path computation.

If the PCC supports both the TCP AO and the TCP MD5 option, a PCE thatsupports the TCP AO is preferentially selected to perform pathcomputation, and if no PCE supports the TCP AO, a PCE that supports theTCP MD5 is selected to perform path computation.

If the PCC supports the TLS and the TCP AO, a PCE used for pathcomputation is determined according to a security requirement, where thesecurity requirement includes: transport layer security, sensitive datasecurity, and transport layer and sensitive data security. If the PCCsupports the TLS and the TCP AO, when the security requirement is thetransport layer and sensitive data security, a PCE that supports the TLSand the TCP AO is selected to perform path computation, or when thesecurity requirement is the transport layer security, a PCE thatsupports the TCP AO is selected to perform path computation, or when thesecurity requirement is the sensitive data security, a PCE that supportsthe TLS is selected to perform path computation.

Further, with reference to a priority of a PCE or load information of aPCE or a preference of the PCC, a PCE may be determined to perform pathcomputation, and the preset selection policy includes:

selecting, with reference to the priority of the PCE or the loadinformation of the PCE or the preference of the PCC, a PCE that has atransmission capability supported by the PCC, to perform pathcomputation. For example, with reference to the priority of the PCE, thepreset selection policy includes: if only one PCE has the transmissioncapability supported by the PCC, selecting the PCE to perform pathcomputation; or if multiple PCEs have the transmission capabilitysupported by the PCC, selecting a PCE with a highest priority in themultiple PCEs to perform path computation.

If the PCC supports both the TCP AO and the TCP MD5 option, a PCE thatsupports the TCP AO is preferentially selected with reference to thepriority of the PCE or the load information of the PCE or the preferenceof the PCC, to perform path computation, and if no PCE supports the TCPAO, a PCE that supports the TCP MD5 is selected with reference to thepriority of the PCE or the load information of the PCE or the preferenceof the PCC, to perform path computation. For example, with reference tothe priority of the PCE, if the PCC supports both the TCP AO and the TCPMD5 option, and if multiple PCEs support the TCP AO, a PCE with ahighest priority is selected to perform path computation, or if only onePCE supports the TCP AO, it is determined that the PCE is used for pathcomputation; if no PCE supports the TCP AO, and if multiple PCEs supportthe TCP MD5 option, a PCE with a highest priority is selected to performpath computation, or if only one PCE supports the TCP MD5 option, it isdetermined that the PCE is used for path computation.

If the PCC supports the TLS and the TCP AO, a PCE used for pathcomputation is determined according to the security requirement and withreference to the priority of the PCE or the load information of the PCEor the preference of the PCC. If the PCC supports the TLS and the TCPAO, and when multiple PCEs meet the security requirement, a PCE with ahighest priority may be selected according to priorities of the multiplePCEs or load information of the PCEs or the preference of the PCC, toperform path computation, or when only one PCE meets the securityrequirement, it is determined that the PCE is used for path computation.

Optionally, the memory 1102 is further configured to save the presetselection policy.

In specific implementation, with reference to the current standardspecification, priority information of the PCE may be carried in thePCED TLV in the OSPF protocol or in the PCED sub-TLV in the IS-ISprotocol.

Optionally, the load information of the PCE includes a load capability,a current load status, and the like of the PCE. When a PCE used for pathcomputation is selected with reference to the load information of thePCE, for example, a PCE that has a strong load capability and whosecurrent load is relatively light may be selected to perform pathcomputation. Certainly, the preset selection policy may also be combinedwith a local policy of the PCC. For example, the local policy is toselect a PCE that supports maximum transmission capabilities. Certainly,the local policy of the PCC may be statically configured, or may bedynamically adjusted according to a requirement.

It should be noted that, after the PCC selects the PCE according to thetechnical solution of the present disclosure, for establishing a PCEPsession with the PCE, submitting a path computation request, acquiring apath computation result, and the like, reference may be made to thecurrent standard specification, and details are not described hereinagain in this embodiment of the present disclosure.

The PCC provided in this embodiment of the present disclosure receives aroute advertisement message that carries transmission capabilityinformation of a PCE, and selects, according to a transmissioncapability of the PCE and a preset selection policy, a PCE that matchesa transmission capability of the PCC, to perform path computation, whichcan improve a success rate of establishing a PCEP session between thePCC and the PCE, and can improve efficiency of path computation.

As shown in FIG. 12, FIG. 12 is a schematic structural diagram ofanother communications device 1200 according to an embodiment of thepresent disclosure. The communications device in this embodiment is aBGP router and is configured to implement the method shown in FIG. 3 inthe present disclosure. The communications device 1200 includes: aprocessor 1201, a memory 1202, a communications interface 1203, and abus 1204.

The processor 1201, the memory 1202, and the communications interface1203 are connected to each other by using the bus 1204, and the bus 1204may be a PCI bus, an EISA bus, or the like. The bus may be classifiedinto an address bus, a data bus, a control bus, and the like. Forconvenience of representation, the bus is represented by using only onethick line in FIG. 12; however, it does not indicate that there is onlyone bus or only one type of bus.

The communications interface 1203 is configured to communicate withanother communications device.

The memory 1202 is configured to store a program. The program mayinclude program code, where the program code includes a computeroperation instruction. The memory 1202 may include a high speed RAM, ormay include a non-volatile memory, for example, at least one magneticdisk memory.

The processor 1201 executes the program stored by the memory 1202 andexecutes a method for advertising a transmission capability according tothis embodiment of the present disclosure, where the method includes:

receiving at least one IGP route advertisement message from an ASdomain, where the IGP route advertisement message includes locationinformation and transmission capability information of a pathcomputation element PCE, and the transmission capability information ofthe PCE includes a first flag bit, a second flag bit, and a third flagbit, where the first flag bit is used to indicate whether the PCEsupports a Transmission Control Protocol TCP digest algorithm 5 option,the second flag bit is used to indicate whether the PCE supports a TCPauthentication option AO, and the third flag bit is used to indicatewhether the PCE supports Transport Layer Security TLS; optionally, thetransmission capability information of the PCE further includes a fourthflag bit, where the fourth flag bit is used to indicate whether the PCEsupports the TLS and the TCP AO;

generating a BGP route advertisement message according to the at leastone IGP route advertisement message, where the BGP route advertisementmessage includes the location information and the transmissioncapability information of the PCE in the at least one IGP routeadvertisement message; and

sending the BGP route advertisement message to an AS domain other thanthe AS.

Assuming that the at least one IGP route advertisement message comesfrom a first AS, and the BGP router is located on a border between thefirst AS and a second AS, the BGP route advertisement message is sent tothe second AS to advertise a transmission capability of the PCE to amember within the second AS.

The communications device 1200 may be a BGP speaker.

The IGP route advertisement message is an OSPF LSA or an IS-IS LSA.

The BGP router may be a BGP speaker.

By extending a PCE-CAP-FLAGS sub-TLV of a PCED TLV in the OSPF protocolor of a PCED sub-TLV in the IS-IS protocol, the transmission capabilityinformation of the PCE may be used to define three currently unused flagbits in the PCE-CAP-FLAGS sub-TLV as the foregoing first flag bit,second flag bit, and third flag bit, which are respectively used toindicate whether the PCE supports the TCP MD5 option, whether the PCEsupports the TCP AO, and whether the PCE supports the TLS. Further, thefourth flag bit may be further defined and is used to indicate whetherthe PCE supports the TLS and the TCP AO.

A format of the PCED TLV in the OSPF protocol or the PCED sub-TLV in theIS-IS protocol may be shown in FIG. 2a . Specifically, reference may bemade to the method provided in the embodiments of the presentdisclosure, and details are not described herein again.

In specific implementation, the BGP protocol may be extended. Forexample, the PCE-ADDRESS sub-TLV and the PCE-CAP-FLAGS sub-TLV aredefined in an NLRI TLV and are carried in the BGP route advertisementmessage. Optionally, by extending a capability optional parameter in theBGP protocol, the transmission capability information of the PCE mayalso be used to define a currently unused capability code, where thecode is used to identify a transmission capability of the PCE. Forextension of the BGP protocol, reference may be made to the method shownin FIG. 3 in the present disclosure, and details are not describedherein again.

Further, the IGP route advertisement message may further include portinformation of the PCE, where the port information includes a port typeand a port number. The port type includes a PCEP over TCP port, and aPCEP over TLS port; or the port type includes: a PCEP over TCP MD5option port, a PCEP over TCP AO port, and a PCEP over TLS port, andfurther, may further include a PCEP over TLS and TCP AO port. Inspecific implementation, the PCED TLV in the OSPF protocol or the PCEDsub-TLV in the IS-IS protocol may be extended, a sub-TLV that carriesthe port information of the PCE is defined, and a format may be shown inFIG. 2b . Specifically, reference may be made to the method shown inFIG. 1 in the present disclosure, and details are not described hereinagain.

Accordingly, the BGP route advertisement message may further include theport information of the PCE. In specific implementation, the BGPprotocol may be extended. For example, the sub-TLV that carries the portinformation of the PCE is defined in NLRI, and a format may be shown inFIG. 2b . Being similar to extension of the OSPF protocol or the IS-ISprotocol, the port information of the PCE may also be carried in twoimplementation manners:

In one manner, two sub-TLVs are defined to carry the port information ofthe PCE, where one sub-TLV carries a PCEP over TCP port, and the othersub-TLV carries a PCEP over TLS port. A PCE that supports the TCP MD5option and a PCE that supports the TCP AO share the sub-TLV that carriesthe PCEP over TCP port, and a PCE that supports the TLS uses the sub-TLVof the PCEP over TLS port. Optionally, if the transmission capabilityinformation of the PCE further includes the fourth flag bit, a PCE thatsupports the TLS and a PCE that supports the TLS and the TCP AO sharethe sub-TLV of the PCEP over TLS port.

In the other manner, three sub-TLVs are defined to respectively carry aPCEP over TCP MD5 option port, a PCEP over TCP AO port, and a PCEP overTLS port. Further, if the transmission capability information of the PCEfurther includes the fourth flag bit, a sub-TLV may be further definedto carry a PCEP over TLS and TCP AO port.

Optionally, after the at least one IGP route advertisement message isreceived and before the BGP route advertisement message is generated,the method further includes: checking whether the at least one IGP routeadvertisement message includes the transmission capability informationof the PCE; and if it is determined that the at least one IGP routeadvertisement message includes the transmission capability informationof the PCE, generating the BGP route advertisement message; or if it isdetermined that the at least one IGP route advertisement message doesnot include the transmission capability information of the PCE,performing processing according to the current standard specification.

In this embodiment of the present disclosure, the communications devicemay generate a BGP route advertisement message according to only one IGProute advertisement message, or may generate a BGP route advertisementmessage according to multiple IGP route advertisement messages receivedfrom an AS domain, and send, to another AS domain by using the BGP routeadvertisement message, location information and transmission capabilityinformation of all PCEs carried in the multiple IGP route advertisementmessages. For example, it is assumed that the communications devicereceives two IGP route advertisement messages: a first IGP routeadvertisement message and a second IGP route advertisement message,where the first IGP route advertisement message includes locationinformation and transmission capability information of a first PCE, thesecond route advertisement message includes location information andtransmission capability information of a second PCE, and the first IGProute advertisement message and the second IGP route advertisementmessage come from an AS domain. The communications device generates theBGP route advertisement message according to the first routeadvertisement message and the second route advertisement message, wherethe BGP route advertisement message includes the location informationand the transmission capability information of the first PCE and thelocation information and the transmission capability information of thesecond PCE.

It may be understood that the IGP route advertisement message mayinclude location information and transmission capability information ofonly one PCE, or may include location information and transmissioncapability information of multiple PCEs. Accordingly, the BGP routeadvertisement message includes the location information and thetransmission capability information of the multiple PCEs in the IGProute advertisement message.

The communications device provided in this embodiment of the presentdisclosure implements advertisement of a PCE transmission capabilitybetween ASs by using an extended BGP protocol, which can ensure that aPCEP session is effectively established between a PCC and a PCE ininter-ASs, and can improve efficiency and a success rate of pathcomputation between the PCC and the PCE.

As shown in FIG. 13, FIG. 13 is a schematic structural diagram of stillanother communications device 1300 according to an embodiment of thepresent disclosure. The communications device in this embodiment is anIGP router and is configured to implement the method shown in FIG. 1 inthe present disclosure. The communications device 1300 includes: aprocessor 1301, a memory 1302, a communications interface 1303, and abus 1304.

The processor 1301, the memory 1302, and the communications interface1303 are connected to each other by using the bus 1304, and the bus 1304may be a PCI bus, an EISA bus, or the like. The bus may be classifiedinto an address bus, a data bus, a control bus, and the like. Forconvenience of representation, the bus is represented by using only onethick line in FIG. 13; however, it does not indicate that there is onlyone bus or only one type of bus.

The communications interface 1303 is configured to communicate withanother communications device.

The memory 1302 is configured to store a program. The program mayinclude program code, where the program code includes a computeroperation instruction. The memory 1302 may include a high speed RAM, ormay include a non-volatile memory, for example, at least one magneticdisk memory.

The processor 1301 executes the program stored by the memory 1302 andexecutes a method for advertising a transmission capability according tothis embodiment of the present disclosure, where the method includes:

generating an IGP route advertisement message, where the routeadvertisement message includes location information and transmissioncapability information of a first PCE, and the transmission capabilityinformation of the first PCE includes a first flag bit, a second flagbit, and a third flag bit, where the first flag bit is used to indicatewhether the first PCE supports a Transmission Control Protocol TCPmessage-digest algorithm 5 MD5 option, the second flag bit is used toindicate whether the first PCE supports a TCP authentication option AO,and the third flag bit is used to indicate whether the first PCEsupports Transport Layer Security TLS; optionally, the transmissioncapability information of the first PCE further includes a fourth flagbit, where the fourth flag bit is used to indicate whether the first PCEsupports the TLS and the TCP AO; and

sending the IGP route advertisement message to an area in which thecommunications device 1300 is located, to advertise a transmissioncapability of the first PCE to a member within the area in which thecommunications device is located.

Generally, it may also mean that the IGP route advertisement message isflooded.

Further, the route advertisement message may further include portinformation of the first PCE, where the port information includes a porttype and a port number. The port type includes a PCEP over TCP port, anda PCEP over TLS port; or the port type includes a PCEP over TCP MD5option port, a PCEP over TCP AO port, and a PCEP over TLS port. Further,optionally, if the transmission capability information of the first PCEfurther includes the fourth flag bit, accordingly, the port typeincludes a PCEP over TLS and TCP AO port.

IGP includes OSPF and IS-IS. Accordingly, the communications device isan OSPF router, the area in which the communications device is locatedis an OSPF area, and the route advertisement message is an OSPF LSA; orthe communications device is an IS-IS router, the area in which thecommunications device is located is an IS-IS area, and the routeadvertisement message is an IS-IS LSA.

In specific implementation, the location information of the first PCE,such as an IPv4 address or an IPv6 address, may be carried in aPCE-ADDRESS sub-TLV of a PCED TLV in the OSPF protocol or of a PCEDsub-TLV in the IS-IS protocol. By extending the PCED TLV in the OSPFprotocol or the PCED sub-TLV in the IS-IS protocol, three currentlyunused flag bits are defined in a PCE-CAP-FLAGS sub-TLV as the foregoingfirst flag bit, second flag bit, and third flag bit, which arerespectively used to indicate whether the first PCE supports the TCP MD5option, whether the first PCE supports the TCP AO, and whether the firstPCE supports the TLS. Further, the fourth flag bit may be furtherdefined and is used to indicate whether the first PCE supports the TLSand the TCP AO. A format of the PCED TLV in the OSPF protocol or thePCED sub-TLV in the IS-IS protocol may be shown in FIG. 2 a. Acorrespondence between four extended flag bits in the PCE-ADDRESSsub-TLV in FIG. 2a and PCE capability descriptions may be as follows:

Flag Bit (bits) Capability Description (capability description) 12Indicating whether to support a TCP MD5 (PCEP over TCP MD5) 13Indicating whether to support a TCP AO (PCEP over TCP AO) 14 Indicatingwhether to support TLS (PCEP over TLS) 15 Indicating whether to supportTLS and a TCP AO (PCEP over TLS and TCP AO)

It should be noted that in FIG. 2a , defining of the four flag bits,namely, 12, 13, 14, and 15 is used as an example, and the foregoing flagbits and the corresponding capability descriptions are also used merelyas an example, and constitute no limitation to the present disclosure.

Further, the PCED TLV in the OSPF protocol or the PCED sub-TLV in theIS-IS protocol may be further extended, a sub-TLV that carries the portinformation of the first PCE is defined, and a format may be shown inFIG. 2b . The port information of the first PCE may be carried in twoimplementation manners:

In one manner, two sub-TLVs are defined to carry the port information ofthe PCE, where one sub-TLV carries a PCEP over TCP port, and the othersub-TLV carries a PCEP over TLS port. A PCE that supports the TCP MD5option and a PCE that supports the TCP AO share the sub-TLV that carriesthe PCEP over TCP port, and a PCE that supports the TLS uses the sub-TLVof the PCEP over TLS port. Optionally, if the transmission capabilityinformation of the first PCE further includes the fourth flag bit, a PCEthat supports the TLS and a PCE that supports the TLS and the TCP AOshare the sub-TLV of the PCEP over TLS port.

In the other manner, three sub-TLVs are defined to respectively carry aPCEP over TCP MD5 option port, a PCEP over TCP AO port, and a PCEP overTLS port. Further, if the transmission capability information of thefirst PCE further includes the fourth flag bit, a sub-TLV may be furtherdefined to carry a PCEP over TLS and TCP AO port.

Further, before the route advertisement message is generated, the methodmay further include: receiving registration information of the firstPCE, where the registration information includes the transmissioncapability of the first PCE.

The registration information may further include a path computationscope, a neighbor PCE, a communication capability, a path computationcapability, and the like of the first PCE. Optionally, the memory 1302is further configured to save the registration information of the firstPCE.

Further, the route advertisement message may further include locationinformation and transmission capability information of a second PCE, andoptionally, further includes port information of the second PCE.Accordingly, the processor 1301 is further configured to receiveregistration information of the second PCE before the routeadvertisement message is generated, where the registration informationincludes a transmission capability of the second PCE.

According to the communications device provided in this embodiment ofthe present disclosure, a PCED TLV in the OSPF protocol or a PCEDsub-TLV in the IS-IS protocol is extended, and a flag bit is defined toindicate a transmission capability of a PCE, so that advertisement ofthe transmission capability of the PCE can be implemented, and a PCC canselect a PCE that matches a transmission capability of the PCC, whichensures that a PCEP session is effectively established between the PCCand the PCE, and improves efficiency and a success rate of pathcomputation between the PCC and the PCE.

A person of ordinary skill in the art may be further aware that, incombination with the examples described in the embodiments disclosed inthis specification, units and steps may be implemented by computersoftware, and the foregoing has generally described compositions andsteps of each example according to functions. Whether the functions areperformed by hardware or software depends on particular applications anddesign constraint conditions of the technical solutions. A personskilled in the art may use different methods to implement the describedfunctions for each particular application, but it should not beconsidered that such implementation goes beyond the scope of the presentdisclosure.

Steps of methods or algorithms described in the embodiments disclosed inthis specification may be implemented by hardware, or a software moduleexecuted by a processor. The software module may be configured in arandom access memory (RAM), a read-only memory (ROM), an electricallyprogrammable ROM, an electrically erasable programmable ROM, a register,a hard disk, a removable disk, or a storage medium in any other formwell-known in the art.

The objectives, technical solutions, and benefits of the presentdisclosure are further described in detail in the foregoing specificembodiments. It should be understood that the foregoing descriptions aremerely specific implementation manners of the present disclosure, butare not intended to limit the protection scope of the presentdisclosure. Any modification, equivalent replacement, or improvementmade on the basis of the technical solutions of the present disclosureshall fall within the protection scope of the present disclosure.

What is claimed is:
 1. A method for determining a path computationelement, comprising: receiving, by a path computation client (PCC), atleast one route advertisement message, wherein the route advertisementmessage comprises location information and transmission capabilityinformation of a path computation element (PCE), and wherein thetransmission capability information of the PCE comprises: (a) a firstflag bit indicating whether the PCE supports a Transmission ControlProtocol (TCP) message-digest algorithm 5 (MD5) option, (b) a secondflag bit indicating whether the PCE supports a TCP authentication option(AO), and (c) a third flag bit indicating whether the PCE supportsTransport Layer Security (TLS); and determining, by the PCC, accordingto a preset selection policy and the transmission capability informationof the PCE in the at least one route advertisement message, a PCE usedfor path computation.
 2. The method according to claim 1, wherein theroute advertisement message further comprises port information of thePCE, the port information including a port type and a port number,wherein the port type comprises a PCE communication protocol (PCEP) overTCP MD5 option port, a PCEP over TCP AO port, and a PCEP over TLS port.3. The method according to claim 1, wherein the route advertisementmessage further comprises port information of the PCE, the portinformation including a port type and a port number, wherein the porttype comprises a PCE communication protocol (PCEP) over TCP port and aPCEP over TLS port.
 4. The method according to claim 1, wherein thepreset selection policy comprises: selecting a PCE that has atransmission capability supported by the PCC, to perform pathcomputation, wherein the transmission capability is one selected fromthe group consisting of: TCP MD5 option, TCP AO, and TLS.
 5. The methodaccording to claim 2, wherein the preset selection policy comprises:selecting a PCE that has a transmission capability supported by the PCC,to perform path computation, wherein the transmission capability is oneselected from the group consisting of: TCP MD5 option, TCP AO, and TLS.6. The method according to claim 1, wherein the preset selection policycomprises: selecting a PCE that has a transmission capability supportedby the PCC, to perform path computation, wherein: if the PCC supportsboth the TCP AO and the TCP MD5 option, preferentially selecting a PCEthat supports at least one of the TCP AO or the TCP MD5 option, toperform path computation, wherein a PCE that supports only the TCP MD5option is selected when no PCE supports the TCP AO; if the PCC supportsthe TLS and the TCP AO, selecting, according to a security requirement,a PCE used for path computation, wherein the security requirementcomprises: transport layer security, sensitive data security, andcombinations thereof;
 7. The method according to claim 1, wherein thepreset selection policy comprises: selecting, with reference to apriority of a PCE or load information of a PCE or a preference of thePCC, a PCE that has a transmission capability supported by the PCC, toperform path computation, wherein the selecting comprises: if the PCCsupports both the TCP AO and the TCP MD5 option, preferentiallyselecting, with reference to the priority of the PCE or the loadinformation of the PCE or the preference of the PCC, a PCE that supportsthe TCP AO, to perform path computation, and if no PCE supports the TCPAO, selecting, with reference to the priority of the PCE, a PCE thatsupports the TCP MD5 option, to perform path computation; and if the PCCsupports the TLS and the TCP AO, selecting, according to a securityrequirement and with reference to the priority of the PCE or the loadinformation of the PCE or the preference of the PCC, a PCE used for pathcomputation, wherein the security requirement comprises: transport layersecurity, sensitive data security, and transport layer and sensitivedata security.
 8. The method according to claim 1, wherein the routeadvertisement message comprises an Interior Gateway Protocol (IGP) routeadvertisement message, or a Border Gateway Protocol (BGP) routeadvertisement message.
 9. A communications device, comprising: acommunications interface, configured to receive at least one routeadvertisement message, wherein the route advertisement message compriseslocation information and transmission capability information of a pathcomputation element (PCE), and the transmission capability informationof the PCE comprises a first flag bit, a second flag bit, and a thirdflag bit, wherein the first flag bit indicates whether the PCE supportsa Transmission Control Protocol (TCP) message-digest algorithm 5 (MD5)option, the second flag bit indicates whether the PCE supports a TCPauthentication option (AO), and the third flag bit indicates whether thePCE supports Transport Layer Security (TLS); and a processor, configuredto determine, according to a preset selection policy and thetransmission capability information of the PCE in the at least one routeadvertisement message, a PCE used for path computation.
 10. Thecommunications device according to claim 9, wherein the routeadvertisement message further comprises port information of the PCE, andthe port information comprises a port type and a port number, whereinthe port type comprises a PCE communication protocol (PCEP) over TCP MD5option port, a PCEP over TCP AO port, and a PCEP over TLS port.
 11. Thecommunications device according to claim 9, wherein the routeadvertisement message further comprises port information of the PCE, andthe port information comprises a port type and a port number, whereinthe port type comprises a PCE communication protocol (PCEP) over TCPport and a PCEP over TLS port.
 12. The communications device accordingto claim 9, wherein the preset selection policy comprises: selecting aPCE that has a transmission capability supported by the PCC, to performpath computation, wherein the transmission capability is one selectedfrom the group consisting of: TCP MD5 option, TCP AO, and TLS.
 13. Thecommunications device according to claim 10, wherein the presetselection policy comprises: selecting a PCE that has a transmissioncapability supported by the PCC, to perform path computation, whereinthe transmission capability is one selected from the group consistingof: TCP MD5 option, TCP AO, and TLS.
 14. The communications deviceaccording to claim 9, wherein the preset selection policy comprises:selecting a PCE that has a transmission capability supported by the PCC,to perform path computation; wherein the selecting comprises one of: ifthe PCC supports both the TCP AO and the TCP MD5 option, preferentiallyselecting a PCE that supports the TCP AO, to perform path computation,and if no PCE supports the TCP AO, selecting a PCE that supports the TCPMD5 option, to perform path computation; if the PCC supports the TLS andthe TCP AO, selecting, according to a security requirement, a PCE usedfor path computation, wherein the security requirement comprises:transport layer security, sensitive data security, and transport layerand sensitive data security.
 15. The communications device according toclaim 9, wherein the preset selection policy comprises: selecting, withreference to a priority of a PCE or load information of a PCE or apreference of the PCC, a PCE that has a transmission capabilitysupported by the PCC, to perform path computation, wherein the selectingcomprises: if the PCC supports both the TCP AO and the TCP MD5 option,preferentially selecting, with reference to the priority of the PCE orthe load information of the PCE or the preference of the PCC, a PCE thatsupports the TCP AO, to perform path computation, and if no PCE supportsthe TCP AO, selecting, with reference to the priority of the PCE, a PCEthat supports the TCP MD5 option, to perform path computation; and ifthe PCC supports the TLS and the TCP AO, selecting, according to asecurity requirement and with reference to the priority of the PCE orthe load information of the PCE or the preference of the PCC, a PCE usedfor path computation, wherein the security requirement comprises:transport layer security, sensitive data security, and transport layerand sensitive data security.
 16. A communications device, comprising: acommunications interface, configured to receive at least one InteriorGateway Protocol (IGP) route advertisement message from an autonomoussystem (AS) domain, wherein the IGP route advertisement messagecomprises location information and transmission capability informationof a path computation element (PCE), and the transmission capabilityinformation of the PCE comprises a first flag bit, a second flag bit,and a third flag bit, wherein the first flag bit indicates whether thePCE supports a Transmission Control Protocol (TCP) message-digestalgorithm 5 (MD5) option, the second flag bit indicates whether the PCEsupports a TCP authentication option (AO), and the third flag bitindicates whether the PCE supports Transport Layer Security (TLS); aprocessor, configured to generate a Border Gateway Protocol (BGP) routeadvertisement message according to the at least one IGP routeadvertisement message, wherein the BGP route advertisement messagecomprises the location information and the transmission capabilityinformation of the PCE in the at least one IGP route advertisementmessage; and the communications interface is further configured to sendthe BGP route advertisement message to another AS domain.
 17. Thecommunications device according to claim 16, wherein the IGP routeadvertisement message further comprises port information of the PCE, andthe port information comprises a port type and a port number, whereinthe port type comprises a PCE communication protocol (PCEP) over TCP MD5option port, a PCEP over TCP AO port, and a PCEP over TLS port; andwherein the BGP route advertisement message further comprises the portinformation of the PCE in the at least one IGP route advertisementmessage.
 18. The communications device according to claim 16, whereinthe IGP route advertisement message further comprises port informationof the PCE, and the port information comprises a port type and a portnumber, wherein the port type comprises a PCE communication protocol(PCEP) over TCP port and a PCEP over TLS port; and wherein the BGP routeadvertisement message further comprises the port information of the PCEin the at least one IGP route advertisement message.
 19. Acommunications device, comprising: a processor, configured to generatean Interior Gateway Protocol (IGP) route advertisement message, whereinthe IGP route advertisement message comprises location information andtransmission capability information of a path computation element (PCE),and the transmission capability information of the PCE comprises a firstflag bit, a second flag bit, and a third flag bit, wherein the firstflag bit indicates whether the PCE supports a Transmission ControlProtocol (TCP) message-digest algorithm 5 (MD5) option, the second flagbit indicates whether the PCE supports a TCP authentication option (AO),and the third flag bit indicates whether the PCE supports TransportLayer Security (TLS); and a communication interface, configured to sendthe IGP route advertisement message to an area in which thecommunications device is located.
 20. The device according to claim 19,wherein the IGP route advertisement message further comprises portinformation of the PCE, and the port information comprises a port typeand a port number, wherein the port type comprises a PCE communicationprotocol (PCEP) over TCP MD5 option port, a PCEP over TCP AO port, and aPCEP over TLS port; and wherein the BGP route advertisement messagefurther comprises the port information of the PCE in the at least oneIGP route advertisement message.
 21. The device according to claim 19,wherein the IGP route advertisement message further comprises portinformation of the PCE, and the port information comprises a port typeand a port number, wherein the port type comprises a PCE communicationprotocol (PCEP) over TCP port and a PCEP over TLS port; and wherein theBGP route advertisement message further comprises the port informationof the PCE in the at least one IGP route advertisement message.